Responses

HTTP status codes are used to communicate result of your request.

HTTP Status CodeDescription
200 OK                               The request was successful.
201 Created The request was successful and resource was created.
204 No ContentThe request was successful and resource was deleted.
400 Bad RequestWhen the request could not be understood.
401 UnauthorizedUnauthorized request, i.e. missing access token.
403 ForbiddenThe request is forbidden due to security reasons.
404 Not FoundRequested resource cannot be found.
405 Method Not AllowedRequested method was not allowed, some other HTTP method is required.
422 Unprocessable EntityThe request was understood but cannot be processed as some validation error might occur. This might also represent an invalid state of the application or other similar problems.
429 Too Many RequestsIn case you exceed maximum number of requests within given period, you receive this error response for any consequent requests. See Rate Limiting for more details.
502 Bad GatewayIn case an underlying API responds with an error. For example this might occur when message is being send to Facebook Messenger and Facebook page is disconnected from Amio.

Location Header

All responses with status code 201 Created contain Location header with actual location of newly created resource, i.e. Location: https://api.amio.io/v1/channels/{channel_id}.