{
	"openapi": "3.0.3",
	"info": {
		"title": "Pristin API",
		"version": "v0",
		"description": "Resolve identity details to a LinkedIn URL or fetch a full profile by URL."
	},
	"components": {
		"securitySchemes": {
			"bearerAuth": {
				"type": "http",
				"scheme": "bearer",
				"description": "Create an API key in [your account](https://app.pristin.ai/account). Accounts receive 100 credits once. Send `Authorization: Bearer <token>` with your customer API key or provisioned tester token. New customer keys start with pr_; include the prefix. Existing pristin_ and unprefixed keys remain valid. Never put credentials in URLs.\n\nSession playground calls are free with separate limits of 10/minute, 50/hour and 100/day. Legacy tester access is non-billable."
			}
		},
		"schemas": {}
	},
	"paths": {
		"/v1/resolve/linkedin": {
			"post": {
				"operationId": "resolveLinkedin",
				"summary": "Resolve a LinkedIn profile",
				"description": "Insufficient or ambiguous evidence returns `not_found`. Errors must not be treated as `not_found`. Allow up to 12 minutes per request when setting your client timeout.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"additionalProperties": false,
								"description": "Supply at least one field: a natural-language description in `text`, structured fields, or both. Omit unavailable fields; supplied values must contain non-whitespace text. Unknown fields are rejected. Maximum request body: 16 KiB.",
								"properties": {
									"name": { "type": "string", "minLength": 1, "maxLength": 320, "pattern": "\\S" },
									"email": { "type": "string", "minLength": 1, "maxLength": 320, "pattern": "\\S" },
									"company": {
										"type": "string",
										"minLength": 1,
										"maxLength": 320,
										"pattern": "\\S"
									},
									"company_domain": {
										"type": "string",
										"minLength": 1,
										"maxLength": 320,
										"pattern": "\\S"
									},
									"title": { "type": "string", "minLength": 1, "maxLength": 320, "pattern": "\\S" },
									"location": {
										"type": "string",
										"minLength": 1,
										"maxLength": 320,
										"pattern": "\\S"
									},
									"text": { "type": "string", "minLength": 1, "maxLength": 2000, "pattern": "\\S" }
								},
								"allOf": [
									{
										"anyOf": [
											{
												"title": "Includes name",
												"type": "object",
												"properties": {
													"name": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["name"]
											},
											{
												"title": "Includes email",
												"type": "object",
												"properties": {
													"email": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["email"]
											},
											{
												"title": "Includes company",
												"type": "object",
												"properties": {
													"company": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["company"]
											},
											{
												"title": "Includes company domain",
												"type": "object",
												"properties": {
													"company_domain": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["company_domain"]
											},
											{
												"title": "Includes title",
												"type": "object",
												"properties": {
													"title": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["title"]
											},
											{
												"title": "Includes location",
												"type": "object",
												"properties": {
													"location": {
														"type": "string",
														"minLength": 1,
														"maxLength": 320,
														"pattern": "\\S"
													}
												},
												"required": ["location"]
											},
											{
												"title": "Includes text",
												"type": "object",
												"properties": {
													"text": {
														"type": "string",
														"minLength": 1,
														"maxLength": 2000,
														"pattern": "\\S"
													}
												},
												"required": ["text"]
											}
										]
									}
								]
							},
							"examples": {
								"structured": {
									"summary": "Structured fields",
									"value": { "name": "Alex Example", "company": "Example Research" }
								},
								"description": {
									"summary": "Natural-language description",
									"value": {
										"text": "Alex Example leads engineering at Example Research in Paris."
									}
								}
							}
						}
					},
					"description": "Supply at least one field: a natural-language description in `text`, structured fields, or both. Omit unavailable fields; supplied values must contain non-whitespace text. Unknown fields are rejected. Maximum request body: 16 KiB."
				},
				"security": [{ "bearerAuth": [] }],
				"x-codeSamples": [
					{
						"lang": "Shell",
						"label": "cURL",
						"source": "curl --request POST 'https://api.pristin.ai/v1/resolve/linkedin' \\\n  --header \"Authorization: Bearer $PRISTIN_API_KEY\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"name\":\"Alex Example\",\"company\":\"Example Research\"}'"
					}
				],
				"responses": {
					"200": {
						"description": "A `found` response costs one credit; `not_found` and failed requests are not charged. `linkedin_url` appears only with `found`. Examples are synthetic.",
						"content": {
							"application/json": {
								"schema": {
									"description": "A `found` response costs one credit; `not_found` and failed requests are not charged. `linkedin_url` appears only with `found`. Examples are synthetic.",
									"type": "object",
									"additionalProperties": false,
									"required": ["status", "reason", "candidates"],
									"properties": {
										"status": { "type": "string", "enum": ["found", "not_found"] },
										"linkedin_url": { "type": "string" },
										"candidates": {
											"type": "array",
											"items": { "type": "string" },
											"description": "All normalized candidate profile URLs in descending evidence-frequency order. Ties retain source order; this is not an identity confidence score."
										},
										"reason": {
											"type": "string",
											"description": "`profile_match` accompanies `found`; `no_linkedin_profile` or `ambiguous_profiles` accompanies `not_found`."
										}
									}
								},
								"examples": {
									"match": {
										"summary": "Profile match",
										"value": {
											"status": "found",
											"linkedin_url": "https://www.linkedin.com/in/synthetic-example",
											"candidates": ["https://www.linkedin.com/in/synthetic-example"],
											"reason": "profile_match"
										}
									},
									"missing": {
										"summary": "No profile found",
										"value": {
											"status": "not_found",
											"reason": "no_linkedin_profile",
											"candidates": []
										}
									},
									"ambiguous": {
										"summary": "Ambiguous profiles",
										"value": {
											"status": "not_found",
											"reason": "ambiguous_profiles",
											"candidates": [
												"https://www.linkedin.com/in/synthetic-example",
												"https://www.linkedin.com/in/other-example"
											]
										}
									}
								}
							}
						}
					},
					"400": {
						"description": "Invalid JSON or identity fields.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Invalid JSON or identity fields."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"401": {
						"description": "Missing or invalid bearer token.",
						"headers": {
							"WWW-Authenticate": {
								"schema": { "type": "string", "example": "Bearer" },
								"description": "Required authentication scheme."
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Missing or invalid bearer token."
								},
								"example": { "error": "unauthorized" }
							}
						}
					},
					"402": {
						"description": "No API credits available. Check your balance and pending reservations.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "No API credits available. Check your balance and pending reservations."
								}
							}
						}
					},
					"403": {
						"description": "Browser origin rejected. Use the configured Pristin application origin.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Browser origin rejected. Use the configured Pristin application origin."
								}
							}
						}
					},
					"409": {
						"description": "Account setup is incomplete or this request ID was already submitted. Complete account setup before use. Reusing X-Request-ID does not replay the original result; check the previous attempt before submitting a new lookup.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Account setup is incomplete or this request ID was already submitted. Complete account setup before use. Reusing X-Request-ID does not replay the original result; check the previous attempt before submitting a new lookup."
								}
							}
						}
					},
					"413": {
						"description": "Request body exceeds 16 KiB.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Request body exceeds 16 KiB."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"415": {
						"description": "Unsupported content type. Send application/json.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Unsupported content type. Send application/json."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"429": {
						"description": "API keys share 10 requests per rolling minute per account. Service-wide limits also apply. Wait the `Retry-After` number of seconds before retrying.",
						"headers": {
							"Retry-After": {
								"schema": { "type": "integer", "minimum": 1 },
								"description": "Seconds to wait before retrying."
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "API keys share 10 requests per rolling minute per account. Service-wide limits also apply. Wait the `Retry-After` number of seconds before retrying."
								},
								"example": { "error": "rate_limited" }
							}
						}
					},
					"500": {
						"description": "Internal or storage failure.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Internal or storage failure."
								},
								"example": { "error": "internal_error" }
							}
						}
					},
					"502": {
						"description": "An upstream service failed.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "An upstream service failed."
								},
								"example": { "error": "provider_error" }
							}
						}
					},
					"503": {
						"description": "The service is shutting down or unavailable.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "The service is shutting down or unavailable."
								},
								"example": { "error": "service_unavailable" }
							}
						}
					},
					"504": {
						"description": "An upstream service timed out.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "An upstream service timed out."
								},
								"example": { "error": "provider_timeout" }
							}
						}
					}
				}
			}
		},
		"/v1/profiles/linkedin": {
			"post": {
				"operationId": "fetchLinkedinProfile",
				"summary": "Fetch a full LinkedIn profile",
				"description": "Profile fields may be absent and reflect publicly available source data. Errors must not be treated as `not_found`.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"additionalProperties": false,
								"required": ["linkedin_url"],
								"properties": {
									"linkedin_url": { "type": "string", "minLength": 1, "maxLength": 2048 }
								}
							},
							"example": { "linkedin_url": "https://www.linkedin.com/in/synthetic-example" }
						}
					}
				},
				"security": [{ "bearerAuth": [] }],
				"x-codeSamples": [],
				"responses": {
					"200": {
						"description": "A `found` response costs one credit, separately from URL resolution. Missing profiles and failed requests are not charged. The `profile` object contains full source fields without truncation.",
						"content": {
							"application/json": {
								"schema": {
									"description": "A `found` response costs one credit, separately from URL resolution. Missing profiles and failed requests are not charged. The `profile` object contains full source fields without truncation.",
									"oneOf": [
										{
											"title": "Profile found",
											"type": "object",
											"additionalProperties": false,
											"required": ["status", "reason", "linkedin_url", "profile"],
											"properties": {
												"status": { "type": "string", "enum": ["found"] },
												"reason": { "type": "string", "enum": ["profile_fetched"] },
												"linkedin_url": { "type": "string" },
												"profile": { "type": "object", "additionalProperties": true }
											}
										},
										{
											"type": "object",
											"additionalProperties": false,
											"title": "No profile",
											"required": ["status", "reason"],
											"properties": {
												"status": { "type": "string", "enum": ["not_found"] },
												"reason": { "type": "string", "enum": ["no_linkedin_profile"] }
											}
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Invalid JSON or LinkedIn profile URL.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Invalid JSON or LinkedIn profile URL."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"401": {
						"description": "Missing or invalid bearer token.",
						"headers": {
							"WWW-Authenticate": {
								"schema": { "type": "string", "example": "Bearer" },
								"description": "Required authentication scheme."
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Missing or invalid bearer token."
								},
								"example": { "error": "unauthorized" }
							}
						}
					},
					"402": {
						"description": "No API credits available. Check your balance and pending reservations.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "No API credits available. Check your balance and pending reservations."
								}
							}
						}
					},
					"403": {
						"description": "Browser origin rejected. Use the configured Pristin application origin.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Browser origin rejected. Use the configured Pristin application origin."
								}
							}
						}
					},
					"409": {
						"description": "Account setup is incomplete or this request ID was already submitted. Complete account setup before use. Reusing X-Request-ID does not replay the original result; check the previous attempt before submitting a new lookup.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Account setup is incomplete or this request ID was already submitted. Complete account setup before use. Reusing X-Request-ID does not replay the original result; check the previous attempt before submitting a new lookup."
								}
							}
						}
					},
					"413": {
						"description": "Request body exceeds 16 KiB.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Request body exceeds 16 KiB."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"415": {
						"description": "Unsupported content type. Send application/json.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Unsupported content type. Send application/json."
								},
								"example": { "error": "invalid_request" }
							}
						}
					},
					"429": {
						"description": "API keys share 10 requests per rolling minute per account. Service-wide limits also apply. Wait the `Retry-After` number of seconds before retrying.",
						"headers": {
							"Retry-After": {
								"schema": { "type": "integer", "minimum": 1 },
								"description": "Seconds to wait before retrying."
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "API keys share 10 requests per rolling minute per account. Service-wide limits also apply. Wait the `Retry-After` number of seconds before retrying."
								},
								"example": { "error": "rate_limited" }
							}
						}
					},
					"500": {
						"description": "Internal or storage failure.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "Internal or storage failure."
								},
								"example": { "error": "internal_error" }
							}
						}
					},
					"502": {
						"description": "An upstream service failed.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "An upstream service failed."
								},
								"example": { "error": "provider_error" }
							}
						}
					},
					"503": {
						"description": "The service is shutting down or unavailable.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "The service is shutting down or unavailable."
								},
								"example": { "error": "service_unavailable" }
							}
						}
					},
					"504": {
						"description": "An upstream service timed out.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"additionalProperties": false,
									"required": ["error"],
									"properties": { "error": { "type": "string" } },
									"description": "An upstream service timed out."
								},
								"example": { "error": "provider_timeout" }
							}
						}
					}
				}
			}
		}
	},
	"servers": [{ "url": "https://api.pristin.ai" }]
}
