Create relations

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/relations

Creates a new relation for an API version. The request body must contain a relation type key value and array that contains a comma-separated list of the corresponding entity ID values:

relationTypeentityId
documentation and testA collection UID value.
environmentAn environment UID value.
mockA mock ID value.
monitorA monitor ID value.

The endpoint accepts multiple relationType arrays in a single call. For an example, see the example response documentation.

Note:

The documentation and test values returned in the response are the relation ID values, not the collection ID values.

Request Body

{"{{relationType}}"=>["{{entityId}}"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"documentation":["b4abc083-3ee2-4fc2-8959-29a7653a1c91"],"environment":["12345678-5daabc50-8451-43f6-922d-96b403b4f28e"],"mock":["e3d951bf-873f-49ac-a658-b2dcb91d3289"],"monitor":["1ecfedca-f067-4920-8a53-ec3ec0f416bf"],"test":["6092f316-b566-4ac8-9ee9-deee67e37c21"]}