Skip to main content

Invitations

POST Accepts invitation

https://api.track.toggl.com/api/v9/organizations/invitations/{invitation_code}/accept

User connected with invitation is marked as joined, email is sent to the inviter.

curl -X POST https://api.track.toggl.com/api/v9/organizations/invitations/{invitation_code}/accept \
-H "Content-Type: application/json"

Parameters

Path

nametyperequireddescription
inviutation_codestringtrueInvitation code

Response

200

OK

403

Forbidden

404

Invalid invitation code

POST Rejects invitation

https://api.track.toggl.com/api/v9/organizations/invitations/{invitation_code}/reject

User connected with invitation is marked as deleted.

curl -X POST https://api.track.toggl.com/api/v9/organizations/invitations/{invitation_code}/reject \
-H "Content-Type: application/json"

Parameters

Path

nametyperequireddescription
inviutation_codestringtrueInvitation code

Response

200

OK

403

Forbidden

404

Invalid invitation code

POST Creates a new invitation for the user

https://api.track.toggl.com/api/v9/organizations/{organization_id}/invitations

Creates a new invitation for the user.

curl -X POST https://api.track.toggl.com/api/v9/organizations/{organization_id}/invitations \
-H "Content-Type: application/json" \
-d '\{"emails":[\{\}],"groups":[\{\}],"project_invite":\{"manager":"boolean","project_id":"integer","workspace_id":"integer"\},"skip_email":"boolean","workspaces":[\{"admin":"boolean","integration_data":\{"external_id":"string","external_type":"string","provider":"string"\},"role":"string","role_id":"integer","workspace_id":"integer"\}]\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.

Body

NameTypeDescription
emailsArray of string-
groupsArray of integer-
project_inviteobject-
skip_emailboolean-
workspacesArray of object-
project_invite
NameTypeDescription
managerboolean-
project_idinteger-
workspace_idinteger-
workspaces
NameTypeDescription
adminboolean-
integration_dataobject-
rolestring-
role_idinteger-
workspace_idinteger-
integration_data
NameTypeDescription
external_idstring-
external_typestring-
providerstring-

Response

200

Created user invitations

NameTypeDescription
dataArray of object-
messagesArray of string-
data
NameTypeDescription
emailstring-
invitation_idinteger-
invite_urlstring-
organization_idinteger-
recipient_idinteger-
sender_idinteger-
workspacesArray of object-
workspaces
NameTypeDescription
user_idinteger-
workspace_idinteger-
workspace_user_idinteger-

400

Possible error messages:

  • Invalid JSON input
  • Invalid organization id
  • at least one email is required
  • at least one workspace is required
  • Missing e-mail
  • Invalid e-mail: '...'
  • invalid workspace ID
  • Active user limit is 5. Upgrade to add more active users
  • Invitation limit reached (please try again later; or upgrade)
  • User with e-mail '...' is already an inactive member of the organization

403

Forbidden

© 2024 Toggl. All rights reserved.