Skip to Content
Teams Invitations

Create a new invitation for a team

POST
/teams/{team_id}/invitations

Path Parameters

team_id*integer

The ID of the team.

Range1 <= value

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
type*TeamInvitationType

The possible types of Team Invitation.

Value in"private""public"
email?string

The user email to send the invitation. Must be a valid email address. This field is required when type is private.

Response Body

Created

application/json
  1. response
id*string

The unique UUID of the given invitation

type*TeamInvitationType

The possible types of Team Invitation.

Value in"private""public"
email*|

The email of the user that has been invited to team

status*TeamInvitationStatus

The possible status of Team Invitation.

Value in"accepted""expired""pending""rejected""active"
status_human_readable*string

Human readable version of the invitation status

public_accept_url*|

The URL to accept the public invitation

accepted_from_ip*|

The IP of the user who accepted the invitation

created_by_user*|null
team*|null
accepted_at*|

The date and time when the invitation was accepted

expires_at*string

The date and time when the invitation will expire

created_at*string

The date and time when the record was created

updated_at*string

The date and time when the record was last updated

Example Request
curl -X POST 'https://api.devopness.com/teams/123/invitations' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "type": "private"}'
Example Response
{  "id": "e57996b5-3cf3-4cae-a925-e2e2ada52732",  "type": "private",  "email": "invited.user@email.com",  "status": "accepted",  "status_human_readable": "Pending invitation",  "public_accept_url": null,  "accepted_from_ip": "172.17.0.24",  "created_by_user": {    "id": 1,    "name": "string",    "email": "user@example.com",    "url_slug": "someone",    "language": "en",    "active": true,    "created_at": "2019-09-25T15:50:48.000000Z",    "updated_at": "2019-09-25T13:52:04.000000Z"  },  "team": {    "id": 137,    "name": "Some Development Team",    "photo_url": "https://example.com/images/my_team.png",    "organization": {      "id": 16523,      "name": "My Organization",      "url_slug": "MyOrganization",      "resource_summary": [        {          "resource_type": "environment",          "resource_type_plural": "environments",          "resource_type_human_readable": "Environment",          "resource_type_human_readable_plural": "Environments",          "summary": {            "count": 1          }        }      ],      "owner": {        "id": 1,        "name": "string",        "email": "user@example.com",        "url_slug": "someone",        "language": "en",        "active": true,        "created_at": "2019-09-25T15:50:48.000000Z",        "updated_at": "2019-09-25T13:52:04.000000Z"      },      "created_at": "2019-09-25T15:50:48.000000Z",      "updated_at": "2019-09-25T13:52:04.000000Z"    },    "created_by_user": {      "id": 1,      "name": "string",      "email": "user@example.com",      "url_slug": "someone",      "language": "en",      "active": true,      "created_at": "2019-09-25T15:50:48.000000Z",      "updated_at": "2019-09-25T13:52:04.000000Z"    },    "created_at": "2019-09-25T13:22:37.000000Z",    "updated_at": "2019-09-25T13:22:37.000000Z"  },  "accepted_at": "2019-09-26T13:22:37.000000Z",  "expires_at": "2019-09-27T13:22:37.000000Z",  "created_at": "2019-09-25T13:22:37.000000Z",  "updated_at": "2019-09-25T13:22:37.000000Z"}