Logo
30 Days of Postman exercises API Documentation

Create API

POST https://api.getpostman.com/apis?workspace=c90a3482-f80d-43d6-9dfb-0830f5e43605

This call creates a new API with a default API Version.

Request body should contain an api object which should atleast have a property name.

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 
workspace
string



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 supposed to handle markdown *descriptions*.", "createdBy": "5665", "createdAt": "2019-02-12 19:34:49", "updatedAt": "2019-02-12 19:34:49" } }



Curl
curl -X POST 'https://api.getpostman.com/apis?workspace=c90a3482-f80d-43d6-9dfb-0830f5e43605?workspace=c90a3482-f80d-43d6-9dfb-0830f5e43605' -H 'Content-Type: application/json' -d '{"api":{"name":"Sync Service API","summary":"This is supposed to be a short summary.","description":"This is description."}}'

ENDPOINTS