cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/scim/v2/Users/csv?file=' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-d '"\n id,forename,surname,email,secondary_email,package_slug,address_line_1,addressLine2,state/region,city_code,country_code,postal_code,phone_number,send_activation_email,cpf_number\n 55907ba0-6ee7-3c6c-00a9-8becwb9k83dk,Name,ExampleSurname,email@example.com,example-optional-secondary-email@email.com,developer-a,Test address line 1,Test address line 2,test state,TN,US,37076,6155555555,YES,87425365821\n "'import requests
url = "https://apipub.firstbasehq.com/scim/v2/Users/csv"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://apipub.firstbasehq.com/scim/v2/Users/csv', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}People
Bulk upsert users
Parses the CSV file and forwards it as a SCIM Bulk request to create and/or update users.
Expected CSV columns (header row): id, forename, surname, email, secondary_email, package_slug, address_line_1, addressLine2, state/region, city_code, country_code, postal_code, phone_number, send_activation_email, cpf_number.
Notes:
- id: optional UUID. If present, an update (PUT) is generated; if absent, a create (POST) with a bulkId is generated.
- package_slug: optional; when present and resolvable it is mapped to a packageId.
- send_activation_email: true/false/yes/no/null (case-insensitive).
- File must be uploaded as multipart form-data with field name ‘file’.- CPF number is mandatory for Brazilian users.
POST
https://apipub.firstbasehq.com
/
scim
/
v2
/
Users
/
csv
cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/scim/v2/Users/csv?file=' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-d '"\n id,forename,surname,email,secondary_email,package_slug,address_line_1,addressLine2,state/region,city_code,country_code,postal_code,phone_number,send_activation_email,cpf_number\n 55907ba0-6ee7-3c6c-00a9-8becwb9k83dk,Name,ExampleSurname,email@example.com,example-optional-secondary-email@email.com,developer-a,Test address line 1,Test address line 2,test state,TN,US,37076,6155555555,YES,87425365821\n "'import requests
url = "https://apipub.firstbasehq.com/scim/v2/Users/csv"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://apipub.firstbasehq.com/scim/v2/Users/csv', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Prefix the value with "ApiKey" to indicate the custom authorization type
Query Parameters
CSV file containing users to upsert. Columns should match the Firstbase CSV template.
Body
multipart/form-data
The body is of type object.
Response
Bulk operation completed
The response is of type string.