İçeriğe geç

API başvurusu

Tüm REST API v1 uçları. Teknik içerik İngilizcedir.

Geliştirici rehberine dönopenapi.json indir

Temel adres: https://24msg.com/api/v1

Channels

Uç sayısı: 1

get/channelsList connected WhatsApp numbers

Removed channels (disconnected, no credentials) are not listed. Tokens and credentials are never returned.

Kapsam:channels:read

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Contacts

Uç sayısı: 7

get/contacts/{id}/attributesGet custom attributes
Kapsam:contacts:read

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
put/contacts/{id}/attributesMerge custom attributes

Merge patch: null deletes a key. Keys match ^[A-Za-z0-9_.-]{1,60}$, at most 50 attributes in total.

Kapsam:contacts:write

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/contacts/{id}Get a contact
Kapsam:contacts:read

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 SuccessContact
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
patch/contacts/{id}Update a contact

Partial update. attributes are merged (null deletes a key). Tags are managed via /tags.

Kapsam:contacts:write

Parametreler

NameInTypeDescription
id *pathstring

İstek

FieldTypeDescription
namestring | null
emailstring (email) | null
locale"en" | "tr" | "de" | "es" | "fr" | "it" | "pt" | null
externalIdstring | null
attributesobject

Yanıtlar

  • 200 SuccessContact
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/contacts/batchUpsert up to 100 contacts

A failing item does not stop the others. Consents are not accepted in batch items.

Kapsam:contacts:writeIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

İstek

FieldTypeDescription
items *ContactUpsert[]

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/contacts/upsertCreate or update a contact

Matches by externalId, then phone. 201 when created, 200 when updated. The consents field additionally requires the consents:write scope.

Kapsam:contacts:writeIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

İstek

FieldTypeDescription
phonestring
externalIdstring
namestring | null
emailstring (email) | null
locale"en" | "tr" | "de" | "es" | "fr" | "it" | "pt" | null
attributesobject
tagsstring[]
consentsobject[]

Yanıtlar

  • 200 ErrorApiError
  • 201 ErrorApiError
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 402 Plan limit reachedApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/contactsList contacts

Newest first. Filters: phone (E.164), externalId, email, tag, createdAfter.

Kapsam:contacts:read

Parametreler

NameInTypeDescription
limitqueryinteger
cursorquerystring
phonequerystring
externalIdquerystring
emailquerystring
tagquerystring
createdAfterquerystring (date-time)

Yanıtlar

  • 200 SuccessContactList
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Consents

Uç sayısı: 2

put/contacts/{id}/consents/{scope}Record a consent decision

granted requires evidence (min 10 chars) and occurredAt, which must be after the latest revocation of that scope (a contact opt-out such as STOP is never overridden by an older grant). Source is always "api".

Kapsam:consents:write

Parametreler

NameInTypeDescription
id *pathstring
scope *pathstring

İstek

FieldTypeDescription
status *"granted" | "revoked"
evidencestring
occurredAtstring (date-time)
textVersionstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/contacts/{id}/consentsConsent state and last 20 consent events
Kapsam:contacts:read

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Tags

Uç sayısı: 3

delete/contacts/{id}/tags/{tag}Remove a tag from a contact

Returns 204 even when the contact did not have the tag.

Kapsam:tags:write

Parametreler

NameInTypeDescription
id *pathstring
tag *pathstring

Yanıtlar

  • 204 Success
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/contacts/{id}/tagsAdd tags to a contact

Duplicates are ignored. A contact can have at most 20 tags.

Kapsam:tags:writeIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
id *pathstring
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

İstek

FieldTypeDescription
tags *string[]

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/tagsList tags with contact counts
Kapsam:contacts:read

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Conversations

Uç sayısı: 3

get/conversations/{id}/messagesList messages of a conversation
Kapsam:messages:read

Parametreler

NameInTypeDescription
id *pathstring
limitqueryinteger
cursorquerystring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/conversations/{id}Get a conversation
Kapsam:conversations:read

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 SuccessConversation
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/conversationsList conversations

Newest first (by creation). Filters: status, contactId, channelId, assigneeMemberId, updatedAfter. No message previews.

Kapsam:conversations:read

Parametreler

NameInTypeDescription
limitqueryinteger
cursorquerystring
statusquery"open" | "pending" | "snoozed" | "resolved"
contactIdquerystring (uuid)
channelIdquerystring (uuid)
assigneeMemberIdquerystring (uuid)
updatedAfterquerystring (date-time)

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Events

Uç sayısı: 1

post/eventsSend a commerce event

Flat body: id (your unique event id), occurredAt, type and the event fields (e.g. order.paid with customer and order). A repeated id returns 200 {status:"duplicate"}. Processing is asynchronous.

Kapsam:events:writeIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

İstek

FieldTypeDescription
id *string
occurredAt *string (date-time)

Yanıtlar

  • 200 ErrorApiError
  • 202 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Account

Uç sayısı: 1

get/meDescribe the API key

Returns the workspace, scopes and plan rate limit of the key used. Useful as a connection test.

Kapsam:geçerli herhangi bir anahtar

Yanıtlar

  • 200 SuccessMe
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Messages

Uç sayısı: 2

get/messages/{id}Get a message and its delivery status
Kapsam:messages:read

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 SuccessMessage
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/messagesSend a message

Goes through the same rules as the inbox: free text and media only inside the 24h window (otherwise 422 template_required), marketing templates need marketing consent (422 no_consent). Idempotency-Key is required; a repeat returns the same message.

Kapsam:messages:sendIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
Idempotency-Key *headerstringSame key + same body returns the first response; a different body returns 422.

Yanıtlar

  • 202 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 402 Plan limit reachedApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Meta

Uç sayısı: 1

get/openapi.jsonOpenAPI document
Kapsam:herkese açık

Yanıtlar

  • 200 Success
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Templates

Uç sayısı: 1

get/templatesList message templates

Read-only (templates are created and approved from the dashboard). channelIds lists connected numbers of the same WhatsApp Business Account.

Kapsam:templates:read

Parametreler

NameInTypeDescription
limitqueryinteger
cursorquerystring
statusquerystring
languagequerystring
categoryquery"MARKETING" | "UTILITY" | "AUTHENTICATION"
channelIdquerystring (uuid)
namequerystring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError

Webhooks

Uç sayısı: 10

post/webhook-deliveries/{id}/redeliverRedeliver an event (same eventId, new delivery)

Only succeeded or dead deliveries can be redelivered.

Kapsam:webhooks:manageIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
id *pathstring
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

Yanıtlar

  • 202 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/webhook-deliveries/{id}Get a delivery with payload and attempts
Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/webhook-endpoints/{id}/deliveriesList deliveries of an endpoint (newest first, payload excluded)
Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring
limitqueryinteger
cursorquerystring
statusquery"pending" | "retrying" | "succeeded" | "dead" | "cancelled"
eventTypequerystring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/webhook-endpoints/{id}/rotate-secretRotate the signing secret

Returns the new secret ONCE. The previous secret keeps signing for 24 hours (two v1= signatures in the header).

Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/webhook-endpoints/{id}/testSend a webhook.test event

Sent even if the endpoint is not subscribed; single attempt; does not count as a failure.

Kapsam:webhooks:manageIdempotency-Key desteklenir

Parametreler

NameInTypeDescription
id *pathstring
Idempotency-KeyheaderstringSame key + same body returns the first response; a different body returns 422.

Yanıtlar

  • 202 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 409 ConflictApiError
  • 422 Unprocessable (business rule: window closed, no consent, idempotency key reused ...)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/webhook-endpoints/{id}Get a webhook endpoint
Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
patch/webhook-endpoints/{id}Update a webhook endpoint

Changing the URL re-runs the SSRF checks. Re-enabling resets the failure counter.

Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring

İstek

FieldTypeDescription
urlstring
events"message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "conversation.opened" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "contact.consent_changed" | "tag.added" | "template.status_changed" | "channel.status_changed" | "campaign.completed" | string[]
descriptionstring | null
enabledboolean

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
delete/webhook-endpoints/{id}Delete a webhook endpoint and its delivery log
Kapsam:webhooks:manage

Parametreler

NameInTypeDescription
id *pathstring

Yanıtlar

  • 204 Success
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 404 Not found (resources of other workspaces are also 404)ApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
get/webhook-endpointsList webhook endpoints
Kapsam:webhooks:manage

Yanıtlar

  • 200 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError
post/webhook-endpointsCreate a webhook endpoint

https only (port 443, public hosts). The signing secret (whsec_…) is returned ONCE in this response. Limit: 10 endpoints per workspace.

Kapsam:webhooks:manage

İstek

FieldTypeDescription
url *string
events *"message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "conversation.opened" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "contact.consent_changed" | "tag.added" | "template.status_changed" | "channel.status_changed" | "campaign.completed" | string[]
descriptionstring | null
enabledboolean

Yanıtlar

  • 201 Successobject
  • 400 Validation errorApiError
  • 401 Missing, malformed, revoked or expired API keyApiError
  • 402 Plan limit reachedApiError
  • 403 Insufficient scope, or the REST API is not included in the planApiError
  • 429 Rate limit exceeded (see Retry-After)ApiError
  • 500 Internal error (quote requestId to support)ApiError