Logo
30 Days of Postman exercises API Documentation

Update an API

PUT https://api.getpostman.com/apis/{{apiId}}

This call updates an existing API .

Request body should contain an api object which should have the fields to be updated. Only name, summary and description fields can be edited for an API.

Response contains an api object with all the details related to the created API, namely, id, name, summary, description etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status OK

{ "api":{ "id": "387c2863-6ee3-4a56-8210-225f774edade", "name": "Sync API", "summary": "This is a summary", "description": "This is a description.", "createdBy": "5665", "createdAt": "2019-02-12 19:34:49", "updatedAt": "2019-02-12 19:34:49" } }



Curl
curl -X PUT 'https://api.getpostman.com/apis/undefined' -H 'Content-Type: application/json' -d '{"api":{"name":"New name","description":"This is an updated Description"}}'

ENDPOINTS