Courier Messaging API

1.0.0

Overview

Statistics
10 Operations
0 Skills
Messaging Category
Publish, consume, and acknowledge messages on Anypoint MQ destinations. Manage message locks and delivery.

Servers

  • http://mq-{REGION_ID}.anypoint.mulesoft.com/api/{version}
  • https://mq-{REGION_ID}.anypoint.mulesoft.com/api/{version}

Authentication & Security

  • bearerAuth http

    Bearer token authentication. Login endpoint: https://anypoint.mulesoft.com/accounts/api/login

  • clientAuth oauth2

    OAuth2 client credentials. Token endpoint: https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token

Get Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages getOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessages

GET

Try it out

Path Parameters
Query Parameters
Custom Query Parameters
Custom Headers
Requests messages from the destination. If you are using connected app, "Destination subscriber for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string

Query Parameters

pollingTime: integer
batchSize: integer
lockTtl: integer
payloadVisibility: string

Response

json
OK, the message or messages has been fetched correctly.
items: array
Array items
Examples
application/json
[ { "headers": { "messageId": "124312340-1234-4321-1236-1234123412344", "lockId": "110e8300-e32b-41d4-a716-664400445500", "ttl": "3600000", "messageGroupId": "OptionalHeaderWhenMessagesAreGroupedForFIFOQueues", "deliveryDelay": "10000", "deliveryCount": "1", "created": "Sat, 1 Jan 2022 02:08:22 GMT" }, "properties": { "userDefinedHeader": "User defined stuff", "anotherUserDefinedHeader": "Random stuff", "Content-Type": "plain/text" }, "body": "This is a message payload" } ]

Update Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages updateOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessages

PUT

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Publishes a batch of messages to the destination. Batch size must be at least 1 and at most 10.
If you are using connected app, "Destination publisher for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string

Request Body

json
items: array
Array items

Response

json
Batch send delivered correctly. Find return status of each of the operations in a status header on each part.
items: array
Array items
Examples
application/json
[ { "messageId": "string", "status": "successful", "statusMessage": "string" } ]

Delete Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages deleteOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessages

DELETE

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Acknowledge a batch of messages. If you are using connected app, "Destination subscriber for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string

Request Body

json
items: array
Array items

Response

json
Performs a negative acknowledge batch sent correctly. Find return status of each of the operations in a status header on each part.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "124312340-1234-4321-1236-1234123412344", "lockId": "110e8300-e32b-41d4-a716-664400445500", "status": "successful", "statusMessage": "status message" }

Patch Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages Locks patchOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesLocks

PATCH

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Modifies the lock TTL of a batch of messages. If you are using connected app, "Destination publisher for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string

Request Body

json
items: array
Array items

Response

json
Successful operation.
items: array
Array items
Examples
application/json
[ { "messageId": "124312340-1234-4321-1236-1234123412344", "lockId": "110e8300-e32b-41d4-a716-664400445500", "status": "successful", "statusMessage": "status message" } ]

Delete Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages Locks deleteOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesLocks

DELETE

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Performs a batch negative acknowledge of messages. These are available again for this or other consumers.
If you are using connected app, "Destination subscriber for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string

Request Body

json
items: array
Array items

Response

json
The operation has been successfully completed.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "124312340-1234-4321-1236-1234123412344", "lockId": "110e8300-e32b-41d4-a716-664400445500", "status": "successful", "statusMessage": "status message" }

Update Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages By Messageid updateOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesByMessageid

PUT

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Sends the message to the specified destination.
If you are using connected app, "Destination publisher for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string
messageId *: string

Request Body

json

Response

json
The message has been correctly sent to the destination.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "string", "status": "successful", "statusMessage": "string" }

Delete Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages By Messageid deleteOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesByMessageid

DELETE

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Performs an acknowledge of the message, effectively deleting it from the destination.
If you are using connected app, "Destination subscriber for given environment" scope is needed.

Path Parameters

environmentId *: string
destinationId *: string
messageId *: string

Request Body

json
lockId: string

Response

json
The operation has been successfully completed.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "124312340-1234-4321-1236-1234123412344", "status": "successful", "statusMessage": "status message" }

Patch Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages By Messageid Locks By Lockid patchOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesByMessageidLocksByLockid

PATCH

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Request Body application/json
Modifies the lock TTL. Typically occurs when the default TTL is not long enough to perform a particular operation.
If you are using connected app, "Destination publisher for given environment" scope is needed.

Path Parameters

lockId *: string
messageId *: string
environmentId *: string
destinationId *: string

Request Body

json
ttl *: integer
Lock time to live in seconds. The maximum TTL allowed is 12 hours.

Response

json
The operation has been successfully completed.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "124312340-1234-4321-1236-1234123412344", "status": "successful", "statusMessage": "status message" }

Delete Organizations By Organizationid Environments By Environmentid Destinations By Destinationid Messages By Messageid Locks By Lockid deleteOrganizationsByOrganizationidEnvironmentsByEnvironmentidDestinationsByDestinationidMessagesByMessageidLocksByLockid

DELETE

Try it out

Path Parameters
Custom Query Parameters
Custom Headers
Performs a negative acknowledge of the message. The message is available again for this or other consumers.
If you are using connected app, "Destination subscriber for given environment" scope is needed.

Path Parameters

lockId *: string
messageId *: string
environmentId *: string
destinationId *: string

Response

json
The operation has been successfully completed.
messageId *: string
status *: string
statusMessage *: string
Examples
application/json
{ "messageId": "124312340-1234-4321-1236-1234123412344", "status": "successful", "statusMessage": "status message" }

Create Authorize createAuthorize

POST

Try it out

Custom Query Parameters
Custom Headers
Request Body application/x-www-form-urlencoded
Obtains an access token using client credentials of the OAuth grant type.
This API is not supported with connectedApp.

Request Body

x-www-form-urlencoded
client_id *: string
client_secret *: string
grant_type *: string

Response

json
Successful operation.
access_token: string
simple_client: object
token_type: string
Examples
application/json
{ "access_token": "aaaaaaa-bbbb-cccc-dddd-eeeeee", "simple_client": { "envId": "efbd5310-438b-47df-b3f7-fbce9652d403", "orgId": "aaaaaaa-bbbb-cccc-ddd-ee" }, "token_type": "bearer" }