Skip to main content
POST
Send a message
Requires the IAM action queue:SendMessage. See QUEUE permissions for the full list, what each one covers, and an example policy.

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Path Parameters

queue_id
string<uuid>
required
Example:

"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"

Body

application/json
body
string
required

The payload. Counted against the queue's max_message_bytes together with the attributes.

Example:

"{\"order_id\":\"A-1001\"}"

attributes
object

Typed attributes carried alongside the body. At most 20; values at most 1024 characters. Binary values are standard base64. The queue never coerces a value — it only checks the value is representable as the declared type.

Example:
delay_seconds
integer

Overrides the queue's default for this message. Rejected on FIFO queues, where it would let a later message become visible before an earlier one in the same group.

Required range: 0 <= x <= 900
Example:

0

message_group_id
string

Required on FIFO queues, rejected on standard ones. Messages sharing a group are delivered in order, and a group's next message is withheld while an earlier one is in flight.

Maximum string length: 128
Example:

"customer-42"

message_deduplication_id
string

FIFO only. A repeat within five minutes is suppressed and the original message's id is returned. Omit on a queue with content_based_deduplication to derive it from the body.

Maximum string length: 128
Example:

"order-A-1001"

Response

Message enqueued. On a FIFO queue with a live deduplication entry the send still succeeds and duplicate is true, naming the message the original send produced.

result
object
required