Lists and describes HTTP responses codes.

This topic lists and describes system generated HTTP client error and success status responses, and server error status responses.

API errors are identified using standard HTTP response codes in a JSON-formatted error message array. For example:

    "error_key": "contacts.api.not_found",
    "error_message": "contact_id is in an invalid format."

Client Error Response Codes

400: Bad Request

Example error message: Bad request. Either the JSON was malformed or there was a data validation error.

Description: Your request includes malformed JSON or does not conform to the expected schema.

Action: Do not resubmit the request until you have verified that the JSON and schema that you are using is valid.

401: Unauthorized

Example error message: The access token used is invalid.

Description: The access token or API key that you provided is not valid or has expired.

Action: Please provide a valid access token or use the OAuth flow to generate a new token.

Learn more: Authentication

403: Forbidden

Example error message: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the applicaton is deactivated.

Description: The API key that you are attempting to use is currently deactivated or your access token does not contain the scope or user privileges required for your request.

Action: Verify that the access token has the appropriate scopes and privileges required for your request.

Learn more: Scopes

Learn more: User Privileges

404: Not Found

Example error message: The requested resource was not found.

Description: The resource that you requested was not found.

Action: Verify that you have provided the correct name (spelling) for the resource, you have properly formatted the request path, and you are requesting access to a resource that exists.

405: Method Not Allowed

Example error message: The requested resource does not support the method used.

Description: The requested resource does not support the HTTP method you used. For example, requesting to POST a resource that does not support the POST method produces a 405 error response code.

Action: Verify that the resource supports the method you are using in your request.

409: Conflict

Example error message: Conflict - a resource with that name already exists.

Description: You are attempting to create (POST) or update (PUT) a resource with a name that already exists for a resource within the account. For example, attempting to create an email address or email campaign name that already exists produces a 409 error response code.

Action: Provide a unique resource name and resend the request.

415: Unsupported Media Type

Example error message: Unsupported Media Type

Description: The media format type that you are specifying for a given resource and method is not supported. For example, attempting to send a request with text/plain as the content-type in the header with a method that requires application/JSON produces a 415 error response code.

Action: Verify that you have specified the appropriate media format type for the resource.

429: Too Many Requests

Example error message: Too many requests. You have exceeded 1,000 queued activities for this user account.

Description: You sent too many requests and exceeded a rate limit in the V3 API. Your API key has a limit of 10,000 requests per day and 4 requests per second. To prevent abuse, the V3 API also has request limits on certain endpoints. The bulk activity endpoints have a limit of 1,000 queued activities per Constant Contact user account.

Action: Wait until the rate limit expires before sending new requests. If you exceed the queued activity limit, use the GET /activities endpoint to determine how many activities are currently in the queue.

Server Error Response Codes

500: Server Error

Example error message: There was a problem with our internal service.

Description: The Constant Contact internal service encountered an unexpected condition that is preventing it from fulfilling your request.

Action: Please try your request again later.

503: Service Unavailable

Example error message: The internal service is temporarily unavailable.

Description: The Constant Contact internal service is temporarily unavailable.

Action: Please try your request again later.

Success Response Codes

200: OK

Your request (GET, PUT, or PATCH) was successful.

201: Created

Your request (usually a PUT or POST) to create a new resource was successful. The response body contains the new resource or a link to the new resource.

202: Accepted

Your POST or DELETE processing request was accepted.

204: No Content

You request was successful and the method did not return a response body. Delete methods usually return 204 response codes. Certain POST methods will also return a 204 response code.