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

You are viewing an old version of the API
Bulk create team members

POST /v2/team-members/bulk-create

Creates multiple TeamMember objects.

The created TeamMember objects are returned on successful creates. This process is non-transactional and processes as much of the request as possible. If one of the creates in the request cannot be successfully processed, the request is not marked as failed, but the body of the response contains explicit error information for the failed create.

Learn about Troubleshooting the Team API.


Permissions
EMPLOYEES_WRITE
Guide
Bulk create team members
Try in API Explorer
Name Description
team_members
Map<string, CreateTeamMemberRequest>

Required

The data used to create the TeamMember objects. Each key is the idempotency_key that maps to the CreateTeamMemberRequest.

Response Fields

Name Description
team_members
Map<string, CreateTeamMemberResponse>

The successfully created TeamMember objects. Each key is the idempotency_key that maps to the CreateTeamMemberRequest.

errors
Error [ ]

The errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/team-members/bulk-create
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/team-members/bulk-create \
  -X POST \
  -H 'Square-Version: 2021-07-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "team_members": {
      "idempotency-key-1": {
        "team_member": {
          "given_name": "Joe",
          "family_name": "Doe",
          "email_address": "joe_doe@gmail.com",
          "reference_id": "reference_id_1",
          "phone_number": "+14159283333",
          "assigned_locations": {
            "location_ids": [
              "YSGH2WBKG94QZ",
              "GA2Y9HSJ8KRYT"
            ],
            "assignment_type": "EXPLICIT_LOCATIONS"
          }
        }
      },
      "idempotency-key-2": {
        "team_member": {
          "given_name": "Jane",
          "family_name": "Smith",
          "email_address": "jane_smith@gmail.com",
          "reference_id": "reference_id_2",
          "phone_number": "+14159223334",
          "assigned_locations": {
            "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS"
          }
        }
      }
    }
  }'
Response JSON
{
  "team_members": {
    "idempotency-key-1": {
      "team_member": {
        "id": "ywhG1qfIOoqsHfVRubFV",
        "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"
          ]
        }
      }
    },
    "idempotency-key-2": {
      "team_member": {
        "id": "IF_Ncrg7fHhCqxVI9T6R",
        "reference_id": "reference_id_2",
        "is_owner": false,
        "status": "ACTIVE",
        "given_name": "Jane",
        "family_name": "Smith",
        "email_address": "jane_smith@gmail.com",
        "phone_number": "+14159223334",
        "assigned_locations": {
          "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS"
        }
      }
    }
  }
}

Share feedback

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