API reference
Base URL https://app.apimaster.in. All requests need Authorization: Bearer am_live_…. Machine-readable spec: openapi.json (OpenAPI 3.1).
GET/v1/public/me
Who am I
Responses
200 | Organisation and key scopes |
401 | Missing, invalid or revoked API key |
402 | No active subscription |
403 | Scope missing or plan has no API access |
429 | Rate limited (120 requests/minute per key) |
curl -X GET https://app.apimaster.in/v1/public/me \
-H "Authorization: Bearer $APIMASTER_KEY"
GET/v1/public/templates
List approved templates — Scope: templates:read
Responses
200 | Approved templates |
401 | Missing, invalid or revoked API key |
402 | No active subscription |
403 | Scope missing or plan has no API access |
429 | Rate limited (120 requests/minute per key) |
curl -X GET https://app.apimaster.in/v1/public/templates \
-H "Authorization: Bearer $APIMASTER_KEY"
POST/v1/public/contacts
Create or update a contact (optionally recording consent) — Scope: contacts:write. Consent requires evidence and never overrides a customer STOP.
Request body
| Field | Type | Required |
|---|
wa_id | string | yes |
name | string | no |
email | string | no |
tags | string[] | no |
consent | object { utility, marketing, evidence } | no |
Responses
201 | Created/updated |
401 | Missing, invalid or revoked API key |
402 | No active subscription |
403 | Scope missing or plan has no API access |
429 | Rate limited (120 requests/minute per key) |
curl -X POST https://app.apimaster.in/v1/public/contacts \
-H "Authorization: Bearer $APIMASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"wa_id":"919812345678","name":"Asha (demo)"}'
POST/v1/public/messages
Send a message — Scope: messages:send. text is allowed only inside the 24-hour customer service window; otherwise send an approved template. Templates require recorded consent for their category.
Request body
| Field | Type | Required |
|---|
to | string | yes |
text | string | no |
template | object { name, language, variables } | no |
{
"to": "+919812345678",
"template": {
"name": "order_shipped",
"language": "en",
"variables": [
"Asha",
"AM-2041"
]
}
}
Responses
202 | Queued |
401 | Missing, invalid or revoked API key |
402 | No active subscription |
403 | Scope missing or plan has no API access |
404 | Contact not found — create it first |
422 | Policy violation (window, consent, template) |
429 | Rate limited (120 requests/minute per key) |
curl -X POST https://app.apimaster.in/v1/public/messages \
-H "Authorization: Bearer $APIMASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+919812345678","template":{"name":"order_shipped","language":"en","variables":["Asha","AM-2041"]}}'
GET/v1/public/messages/{id}
Message status — Scope: messages:read
Parameters
| Name | In | Type | Required |
|---|
id | path | string | yes |
Responses
200 | Message |
401 | Missing, invalid or revoked API key |
402 | No active subscription |
403 | Scope missing or plan has no API access |
404 | Not found |
429 | Rate limited (120 requests/minute per key) |
curl -X GET https://app.apimaster.in/v1/public/messages/<message-id> \
-H "Authorization: Bearer $APIMASTER_KEY"
Schemas
Error
id | string |
wa_id | string |
name | string | null |
email | string | null |
tags | string[] |
consent_utility | boolean |
consent_marketing | boolean |
opted_out_at | string | null |
Message
id | string |
direction | "in" | "out" |
type | string |
body | string | null |
status | "received" | "queued" | "sent" | "delivered" | "read" | "failed" |
error_code | string | null |
wa_message_id | string | null |
WebhookEvent
id | string |
event | "message.received" | "message.sent" | "message.status" |
created_at | string |
data | object |