Create webhook endpoint
POST
/v2/webhook-endpoints
const url = 'https://api.orderfast.com.ar/v2/webhook-endpoints';const options = { method: 'POST', headers: { 'idempotency-key': 'example', 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"url":"https://partner.example.com/webhooks/orderfast","events":["order.created","payment.completed"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orderfast.com.ar/v2/webhook-endpoints \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'idempotency-key: example' \ --data '{ "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ] }'Returns the endpoint plus a one-time secret. Requires Idempotency-Key.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Header Parameters
Sección titulada «Header Parameters»idempotency-key
required
string
Idempotency-Key
required
string
Unique key to safely retry webhook creation
Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
url
required
string
Example
https://partner.example.com/webhooks/orderfastevents
required
Array<string>
Example
[ "order.created", "payment.completed"]Example
{ "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ]}Responses
Sección titulada «Responses»Resource created
Media typeapplication/json
object
data
required
object
id
required
string
url
required
string
events
required
Array<string>
status
required
string
created_at
required
string
secret
required
string
Examples
Examplesuccess
Successful response
{ "data": { "id": "wh_001", "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ], "status": "active", "created_at": "2026-07-01T10:00:00.000Z", "secret": "whsec_abc123..." }}Unauthorized — missing or invalid API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Exampleunauthorized
Invalid API key
{ "error": { "code": "unauthorized", "message": "Missing or invalid API key", "request_id": "req_01J..." }}Permission denied
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Examplepermission_denied
Missing permission
{ "error": { "code": "permission_denied", "message": "The API key does not have the required permission", "request_id": "req_01J..." }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Exampleconflict
Conflict / idempotency mismatch
{ "error": { "code": "conflict", "message": "Idempotency-Key was already used with a different request body", "request_id": "req_01J..." }}Validation error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Examplevalidation_error
Invalid body or query
{ "error": { "code": "validation_error", "message": "One or more fields failed validation", "request_id": "req_01J..." }}Internal server error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Exampleinternal_error
Unexpected failure
{ "error": { "code": "internal_error", "message": "An unexpected error occurred", "request_id": "req_01J..." }}