🎉 We just launched our most advanced AI model ever. Learn more
API Documentation
API Documentation
API Reference
Authentication
Dr. Headshot uses API keys to allow access to the API. All API requests are scoped to a company account.
A unique API key can be generated by company account owners in the account settings. Once created, the API key will only be shown once, so make sure to store it securely.
Dr. Headshot expects the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer API_KEYAll request bodies need to be valid JSON.
Note: The API is available for team accounts. You can generate your API key in the account settings.
API Endpoints
All Dr. Headshot API endpoints start with https://api.drheadshot.com/v2/company-api
Get organization details
/v2/company-api/organization{
"_id": "507f1f77bcf86cd799439011",
"companyName": "Acme Corporation",
"email": "contact@acme.com",
"website": "https://acme.com"
}Check credits
/v2/company-api/credits{
"success": true,
"credits": 10
}Invite a team member
/v2/company-api/invitesRequest Body:
{
"email": "user@example.com",
"label": "Optional label"
}Response:
{
"success": true,
"sent": 1,
"failed": 0,
"skipped": 0,
"invites": [
{
"_id": "507f1f77bcf86cd799439011",
"code": "unique-invite-code",
"created": 1642684800000,
"updated": 1642684800000,
"used": 0,
"active": true,
"maxUses": 1,
"allowedEmails": [
"user@example.com"
],
"emailInvite": true,
"inviteUrl": "https://drheadshot.com/app/create/upload/step1?inviteID=unique-invite-code&email=user@example.com"
}
]
}Revoke an invite
/v2/company-api/invites/:emailResponse:
{
"success": true,
"message": "Invite revoked successfully"
}Get all invites
/v2/company-api/invitesResponse:
{
"success": true,
"invites": [
{
"_id": "507f1f77bcf86cd799439011",
"code": "unique-invite-code",
"created": 1642684800000,
"updated": 1642684800000,
"used": 0,
"maxUses": 1,
"active": true,
"allowedEmails": [
"user@example.com"
],
"label": "Optional label",
"inviteUrl": "https://drheadshot.com/app/create/upload/step1?inviteID=unique-invite-code&email=user@example.com"
}
]
}Get invite
/v2/company-api/invites/:idResponse:
{
"success": true,
"invite": {
"_id": "507f1f77bcf86cd799439011",
"code": "unique-invite-code",
"created": 1642684800000,
"updated": 1642684800000,
"used": 0,
"maxUses": 1,
"active": true,
"allowedEmails": [
"user@example.com"
],
"label": "Optional label",
"inviteUrl": "https://drheadshot.com/app/create/upload/step1?inviteID=unique-invite-code&email=user@example.com"
}
}Get all photoshoots
/v2/company-api/photoshoots?status=pendingstatus can be set to pending or done to filter results.Response:
{
"success": true,
"photoshoots": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "John Doe",
"credits": 5,
"gender": "male",
"created": 1642684800000,
"inviteID": "507f1f77bcf86cd799439012"
}
]
}Get images from photoshoot
/v2/company-api/photoshoots/:modelID/images?favorite=1favorite=1 can be used to filter only favorite images.Response:
{
"success": true,
"images": [
{
"_id": "507f1f77bcf86cd799439013",
"original": "https://storage.googleapis.com/drheadshot/images/image.jpg",
"preview": "https://storage.googleapis.com/drheadshot/images/preview-image.jpg",
"favorite": 1,
"ts": 1642684800000
}
]
}