This endpoint lets you create a new API key.
For more details on how API keys work, and how to handle them securely, see the Security and API Key Usage guide.
The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.
Request body schema for creating or updating an API key
Name given to recognize the Api key
"API key name"
Description of the API key
"API key for updating business name, and categories."
Must be at least the day after today. If you want it to expire today you must revoke it. You can set it to null.
yyyy-mm-dd"2022-06-05"
List of IP or CIDR network notations to which API Key calls are restricted.
Empty list means no restriction.
["172.16.0.0/12", "127.0.0.1"]Whether or not the API key has customized permissions. If false, it has the same permissions as the user who created the key.
⚠️ Required if the permissions parameter is provided. ⚠️
true
List of permission names to assign to the API Key.
⚠️ Required if the has_restricted_permissions parameter is provided. ⚠️
[
"business_edit",
"business_edit_name",
"business_edit_categories"
]Created
Base API Key object with common properties
3245
Name given to recognize the Api key
"API key name"
Description of the API key
"API key for updating business name, and categories."
User id
"5309c3a237bbc544d8e26737"
User first name and last name concatenated. Can be null if it's your org integration api key.
"Perceval de Galles"
User role in the application
PROVIDER, ORG_ADMIN, ORG_MANAGER, GROUP_MANAGER, BUSINESS_MANAGER, PUBLISHER "BUSINESS_MANAGER"
Whether the API key belongs to a bot user (created automatically for integrations) or a regular human user.
bot, user "user"
Is true if someone revoked the key.
false
Must be at least the day after today. If you want it to expire today you must revoke it. You can set it to null.
yyyy-mm-dd"2022-06-05"
date"2019-08-22 11:46:38.914467+00"
User id
"5309c3a237bbc544d8e26737"
First name and last name concatenated of the user that created the key
"John Smith"
date"2018-03-12 11:49:03.399475+00"
User id
"5309c3a237bbc544d8e26737"
First name and last name concatenated of the user that revoked the key
"John Smith"
date"2020-10-20 11:46:38.914467+00"
List of IP or CIDR network notations to which API Key calls are restricted.
Empty list means no restriction.
["172.16.0.0/12", "127.0.0.1"]Whether or not the API key has customized permissions. If false, it has the same permissions as the user who created the key.
true
List of permission names linked to the API Key.
[
"business_edit",
"business_edit_name",
"business_edit_categories"
]