Create a team
POST/v1/teams
This route allows you to create a new team in your Port organization.
To learn more about teams, check out the documentation.
Request
Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[^;#/\\?\\s][^;#/\\?]*[^;#/\\?\\s]$",
"description": "The name of the new team."
},
"users": {
"type": "array",
"items": {
"type": "string"
},
"description": "One or more e-mail addresses of users to add to the new team."
},
"description": {
"type": "string",
"description": "The description of the new team."
}
},
"required": [
"name"
]
}
}
},
"required": true
}
}Responses
- 200
- 401
- 404
- 413
- 422
Created successfully.
Default Response
A resource with the provided identifier was not found
Request body is too large (limit is 1MiB)
The json provided does not match the route's schema
Responses (JSON)
{
"responses": {
"200": {
"description": "Created successfully.",
"content": {
"application/json": {
"schema": {
"description": "Created successfully.",
"type": "object",
"properties": {
"ok": {
"enum": [
true
]
},
"team": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"provider": {
"type": "string"
},
"description": {
"type": "string"
},
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"picture": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
}
},
"required": [
"team",
"ok"
],
"additionalProperties": false
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
},
"413": {
"description": "Request body is too large (limit is 1MiB)",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"description": "Request body is too large (limit is 1MiB)"
}
}
}
},
"422": {
"description": "The json provided does not match the route's schema",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "The json provided does not match the route's schema"
}
}
}
}
}
}