Organization API › Teams
Create a team
POST/api/v1/teams
Creates a team, optionally with its first members. A member id that is not in the organization is skipped.
Permission (API-key scope): identity:team:write.
Authorization
bearerAuth(identity:team:write)apiKeyHeader(identity:team:write)
Request body required
namestring requiredslugstringdescriptionstringmembersarray of objectuser_idstring requiredroleTeamMemberRole
Responses
201
The team.
dataTeam requiredShow Team properties
idstring requirednamestring requiredslugstringdescriptionstringorg_idstring requiredmember_countinteger requiredmember_idsarray of string requiredcreated_atstring (date-time) requiredupdated_atstring (date-time) required
successboolean required
400
Not JSON (INVALID_BODY), or the name is empty or longer than 100 characters (VALIDATION_ERROR).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
409
A team with that name or slug exists (TEAM_NAME_TAKEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
Example request
curl -X POST 'https://evohub.io/api/v1/teams' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "Platform",
"slug": "platform",
"members": [
{
"role": "member",
"user_id": "usr_7a3c9e10-b2d4-4f6a-8c1e-5d7f9a0b2c3e"
}
],
"description": "Owns the core API"
}'