Select an existing team or create a new one

A Team member or Team owner can create a Contract in a Team. A User will therefore need to be a Team member of another User's team or be a Team owner to create a Contract.

📘

Personal team

Every User is the Team Owner of "Personal Team" which can be renamed if required.

How to create a team?

To create a team for a User, you'll need the User Id. You can use the Get User endpoint to fetch this If you do not already have it. The Team endpoint provides more information on how to create a team. The response will give you the Team Id.

curl --request POST \
     --url https://sandbox.legislate.tech/v1/users/{{userId}}/teams \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{API Key}}' \
     --header 'Content-Type: application/json'

How to select an existing team

To select a User's existing team where they are a Team Owner, you'll need the User's Id and the Get Teams endpoint.

curl --request GET \
     --url https://sandbox.legislate.tech/v1/users/{{userId}}/teams \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{API Key}}'

Once you have identified the team where your User can create contracts, you'll need to determine which contracts they can create in that team. Go to the next section to find out how!