> For the complete documentation index, see [llms.txt](https://docs.goodfit.io/goodfit-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goodfit.io/goodfit-docs/apis/enrichment-api/contact-endpoints.md).

# Contact endpoints

## Enrich a contact

> Adds the person to your Goodfit dataset asynchronously. Identify them by linkedInUrl, workEmail, or firstName + lastName + companyDomain or companyName. Poll GET /enrich-contact/request/{requestId} with the returned id. A result offering employments or candidates is settled with POST /enrich-contact/request/{requestId}/resolve, or by resending with selectedCompanyId or selectedCandidateId. An identical request that is still in flight returns its id with a 200 instead.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Enrichment API","version":"1.0.0"},"tags":[{"name":"Contact enrichment"}],"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CONTACT_ENRICHMENT_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/enrichment/enrich-contact/request":{"post":{"operationId":"enrichment:enrichContact","summary":"Enrich a contact","description":"Adds the person to your Goodfit dataset asynchronously. Identify them by linkedInUrl, workEmail, or firstName + lastName + companyDomain or companyName. Poll GET /enrich-contact/request/{requestId} with the returned id. A result offering employments or candidates is settled with POST /enrich-contact/request/{requestId}/resolve, or by resending with selectedCompanyId or selectedCandidateId. An identical request that is still in flight returns its id with a 200 instead.","tags":["Contact enrichment"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identity":{"type":"object","properties":{"selectedCandidateId":{"type":["string","null"]},"linkedInUrl":{"type":["string","null"]},"companyName":{"type":["string","null"]},"companyDomain":{"type":["string","null"]},"workEmail":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"selectedCompanyId":{"type":["string","null"]}}},"externalIds":{"type":"object","properties":{"salesforce":{"type":["string","number","null"]},"hubspot":{"type":["string","number","null"]}}},"enrichPhoneNumber":{"default":false,"type":"boolean"},"syncToCRM":{"default":false,"type":"boolean"}},"required":["identity"]}}}},"responses":{"201":{"description":"The request is recorded and queued","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","COMPLETE"]}},"required":["requestId","status"],"additionalProperties":false}}}},"400":{"description":"No LinkedIn URL, work email, or first name + last name + company was given, a field is malformed, selectedCandidateId was not offered for this contact, or an external id names a CRM that is not connected","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INVALID_REQUEST"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["UNAUTHENTICATED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"402":{"description":"Out of contact credits, or of phone number credits when enrichPhoneNumber is set","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INSUFFICIENT_CREDITS"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["FORBIDDEN"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["RATE_LIMITED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INTERNAL_ERROR"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## Get a contact enrichment request

> result is present once the request is COMPLETE, and error once it is ERROR.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Enrichment API","version":"1.0.0"},"tags":[{"name":"Contact enrichment"}],"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CONTACT_ENRICHMENT_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/enrichment/enrich-contact/request/{requestId}":{"get":{"operationId":"enrichment:getContactEnrichmentRequest","summary":"Get a contact enrichment request","description":"result is present once the request is COMPLETE, and error once it is ERROR.","tags":["Contact enrichment"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a contact enrichment request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","COMPLETE"]},"error":{"type":"string"},"inputs":{"type":"object","properties":{"selectedCandidateId":{"type":"string"},"linkedInUrl":{"type":"string"},"companyName":{"type":"string"},"companyDomain":{"type":"string"},"workEmail":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"jobTitle":{"type":"string"},"selectedCompanyId":{"type":"string"}},"additionalProperties":false},"result":{"type":"object","properties":{"found":{"type":"boolean"},"matchedBy":{"type":"string","enum":["linkedInUrl","workEmail","crmRecord","name"]},"reason":{"type":"string","enum":["PERSON_NOT_FOUND","MULTIPLE_EMPLOYMENTS_FOUND","NO_COMPANY_MATCH","NOT_ENOUGH_INFORMATION","COMPANY_HAS_NO_DOMAIN","COMPANY_RESOLUTION_CONFLICT","CONTACT_RESOLUTION_CONFLICT","CRM_RECORD_NOT_FOUND","NAME_NOT_FOUND_AT_COMPANY","COMPANY_DOMAIN_NOT_FOUND","COMPANY_NAME_NOT_FOUND","FORMER_EMPLOYEE","MULTIPLE_PEOPLE_FOUND"],"description":"Why the contact was not added when `found` is false. A LinkedIn URL whose profile no longer exists returns `PERSON_NOT_FOUND`. Nothing is charged when `found` is false."},"employments":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"type":["string","null"]},"companyDomain":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"startDate":{"type":["string","null"]}},"required":["companyId","companyName","companyDomain","jobTitle","startDate"],"additionalProperties":false}},"candidates":{"type":"array","items":{"type":"object","properties":{"candidateId":{"type":"string"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"companyId":{"type":"string"},"companyName":{"type":["string","null"]},"companyDomain":{"type":["string","null"]},"isFormerEmployment":{"type":"boolean"},"linkedInUrl":{"type":"string"}},"required":["candidateId","firstName","lastName","jobTitle","companyId","companyName","companyDomain","isFormerEmployment","linkedInUrl"],"additionalProperties":false}},"linkedInUrl":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"jobTitle":{"type":"string"},"startDate":{"type":"string"},"isFormerEmployment":{"type":"boolean"},"workEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"string","const":"NOT_FOUND"},{"type":"string","const":"SKIPPED_EX_EMPLOYEE"}]},"mobilePhone":{"anyOf":[{"type":"string"},{"type":"string","const":"NOT_FOUND"},{"type":"string","const":"NOT_REQUESTED"}]},"personas":{"default":[],"type":"array","items":{"type":"string"}},"addedToDataset":{"type":"boolean"},"syncedToCRM":{"type":"boolean"},"syncFailureReason":{"type":"string"},"company":{"type":"object","properties":{"companyId":{"type":"string"},"linkedInUrl":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"markets":{"default":[],"type":"array","items":{"type":"string"}},"addedToDataset":{"type":"boolean"},"externalIds":{"type":"object","properties":{"salesforce":{"type":"string"},"hubspot":{"type":"string"}},"additionalProperties":false}},"required":["companyId","markets","addedToDataset"],"additionalProperties":false},"externalIds":{"type":"object","properties":{"salesforce":{"type":"string"},"hubspot":{"type":"string"}},"additionalProperties":false}},"required":["found","personas"],"additionalProperties":false}},"required":["requestId","status","inputs"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INVALID_REQUEST"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["UNAUTHENTICATED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["FORBIDDEN"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No contact enrichment request with this id exists for your account","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["NOT_FOUND"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["RATE_LIMITED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INTERNAL_ERROR"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## Pick a person or employment

> Settles a COMPLETE contact enrichment that offered a choice: send selectedCandidateId for MULTIPLE\_PEOPLE\_FOUND, or selectedCompanyId for MULTIPLE\_EMPLOYMENTS\_FOUND. It enriches the one picked as a new request, with the original identity and options. Poll GET /enrich-contact/request/{requestId} with the returned id.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Enrichment API","version":"1.0.0"},"tags":[{"name":"Contact enrichment"}],"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CONTACT_ENRICHMENT_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/enrichment/enrich-contact/request/{requestId}/resolve":{"post":{"operationId":"enrichment:resolveContactEnrichmentRequest","summary":"Pick a person or employment","description":"Settles a COMPLETE contact enrichment that offered a choice: send selectedCandidateId for MULTIPLE_PEOPLE_FOUND, or selectedCompanyId for MULTIPLE_EMPLOYMENTS_FOUND. It enriches the one picked as a new request, with the original identity and options. Poll GET /enrich-contact/request/{requestId} with the returned id.","tags":["Contact enrichment"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"selectedCandidateId":{"description":"The candidateId picked from a MULTIPLE_PEOPLE_FOUND result","type":"string"},"selectedCompanyId":{"description":"The companyId picked from a MULTIPLE_EMPLOYMENTS_FOUND result","type":"string"}}}}}},"responses":{"201":{"description":"The person picked is recorded and queued","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["QUEUED","IN_PROGRESS","ERROR","COMPLETE"]}},"required":["requestId","status"],"additionalProperties":false}}}},"400":{"description":"Not exactly one of selectedCandidateId and selectedCompanyId was sent, the id is not one this request offered, or the person picked has left the company","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INVALID_REQUEST"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["UNAUTHENTICATED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"402":{"description":"Out of contact credits, or of phone number credits when the request asked for a phone number","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INSUFFICIENT_CREDITS"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["FORBIDDEN"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No contact enrichment request with this id exists for your account","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["NOT_FOUND"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"409":{"description":"The request has not finished, or did not end with a choice to make","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["CONFLICT"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["RATE_LIMITED"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string","description":"Human readable. Wording may change between releases"},"code":{"type":"string","enum":["INTERNAL_ERROR"],"description":"Stable identifier. Match on this rather than on `error`"}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```
