• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Create team member

POST /v2/team-members

Creates a single TeamMember object.

The TeamMember object is returned on successful creates. You must provide the following values in your request to this endpoint:

  • given_name
  • family_name

Learn about Troubleshooting the Team API.


Permissions
EMPLOYEES_WRITE
Guide
Set up a new team member
Try in API Explorer
Name Description
idempotency_key
string

A unique string that identifies this CreateTeamMember request. Keys can be any valid string, but must be unique for every request. For more information, see Idempotency.

The minimum length is 1 and the maximum length is 45.

team_member
TeamMember

Required The data which will be used to create the TeamMember object.

Response Fields

Name Description
team_member
TeamMember

The successfully created TeamMember object.

errors
Error [ ]

The errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/team-members
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/team-members \
  -X POST \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "idempotency-key-0",
    "team_member": {
      "reference_id": "reference_id_1",
      "status": "ACTIVE",
      "given_name": "Joe",
      "family_name": "Doe",
      "email_address": "joe_doe@gmail.com",
      "phone_number": "+14159283333",
      "assigned_locations": {
        "location_ids": [
          "YSGH2WBKG94QZ",
          "GA2Y9HSJ8KRYT"
        ],
        "assignment_type": "EXPLICIT_LOCATIONS"
      }
    }
  }'
Response JSON
{
  "team_member": {
    "id": "1yJlHapkseYnNPETIU1B",
    "reference_id": "reference_id_1",
    "is_owner": false,
    "status": "ACTIVE",
    "given_name": "Joe",
    "family_name": "Doe",
    "email_address": "joe_doe@gmail.com",
    "phone_number": "+14159283333",
    "assigned_locations": {
      "assignment_type": "EXPLICIT_LOCATIONS",
      "location_ids": [
        "GA2Y9HSJ8KRYT",
        "YSGH2WBKG94QZ"
      ]
    }
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?