API Responses | Developer.Teamwork.com

API Responses

GuidesAPI Responses

API Responses

Teamwork REST API Responses:

Success Responses

200 OK

If a request succeeds, it will return a status code in the 200 range and often a JSON (or XML if requested) response.
Usually for GET, PUT, DELETE.

201 CREATED

Creating new objects like messages or tasks will usually return a “201 Created” status. However, updating records will usually return a “200 OK” status code.
Usually, for POST if a request fails, a non-200 status code will be returned, possibly with error information.

304 Not Modified

This means the request is coming from cache. It was first loaded with a 200 success. Since your last call, no data has changed so your request comes from cache. You will usually see this on the front end where the API is called. If you use developer tools in your browser you will most certainly come across this!

Error Codes

422 Error Code

This is basically a sign that we could not read the submitted JSON.

Common Causes

Missing: request>…. (XML) or {“REQUEST”:{…..}} (JSON)

Missing: Top level encapsulation item. e.g: …. (XML) or {“MILESTONE”:{…..}} (JSON)

500 Error Code

This is a sign that something on our side didn’t quite go to plan. Let us know and we’ll get right on it!

401 Error Code

Unauthorized.

Common Causes

You need to check your API key and make sure it’s set up correctly.

400 Error Code

This is a sign that something on your side didn’t quite go to plan.

Common Causes

Bad Request – You requested an incorrect API call. Have another peek at the documentation for the call you are making.

403 Error Code

This is a sign that there is a permissions issue.

Common Causes

Bad Request – you might be using an API key which does not have permissions to perform the action you want.

404 Error Code

Not found.

Common Causes

Check the path again and make sure this is a valid API endpoint.

Rate Limiting

429 Error Code

OK, we had to add in rate-limiting to keep you from hammering our poor servers. So if we receive more than 150 requests per minute, we will send you to the sin bin. ie. you will receive a HTTP 429 Error code in response. The status text returned will be “You have exceeded your rate limit. Please try again in a little while.”
After 60 seconds, we’ll let you back in!

Check the headers of the response for X-RateLimit-Remaining and X-RateLimit-Limit.

Note:

If you are syncing data and pulling paged data constantly you might find your rate limits reduced with a response header “Syncing data requires an ‘updatedAfterDate’ to be passed. Rate limit reduced….”

Feedback

If you have any feedback or suggestions, feel free to contact us at api@teamwork.com.

‹ Back to guides