blujay 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/contacts/client/Client.js +4 -4
- package/dist/cjs/api/resources/contacts/client/Client.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactCreateParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactCreateParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactSearchParams.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactSearchParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpdateParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpdateParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpsertParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpsertParams.js.map +1 -1
- package/dist/cjs/api/types/Contact.d.ts +2 -0
- package/dist/cjs/api/types/Contact.js.map +1 -1
- package/dist/cjs/api/types/ContactAssignmentActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactAssignmentActionResult.js.map +1 -1
- package/dist/cjs/api/types/ContactStageActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactStageActionResult.js.map +1 -1
- package/dist/cjs/api/types/ContactTagActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactTagActionResult.js.map +1 -1
- package/dist/cjs/custom/version.d.ts +1 -1
- package/dist/cjs/custom/version.js +1 -1
- package/dist/cjs/custom/version.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/Client.d.ts +4 -4
- package/dist/esm/api/resources/contacts/client/Client.js +4 -4
- package/dist/esm/api/resources/contacts/client/Client.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactCreateParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactCreateParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactSearchParams.d.ts +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactSearchParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactUpdateParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactUpdateParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactUpsertParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactUpsertParams.js.map +1 -1
- package/dist/esm/api/types/Contact.d.ts +2 -0
- package/dist/esm/api/types/Contact.js.map +1 -1
- package/dist/esm/api/types/ContactAssignmentActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactAssignmentActionResult.js.map +1 -1
- package/dist/esm/api/types/ContactStageActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactStageActionResult.js.map +1 -1
- package/dist/esm/api/types/ContactTagActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactTagActionResult.js.map +1 -1
- package/dist/esm/custom/version.d.ts +1 -1
- package/dist/esm/custom/version.js +1 -1
- package/dist/esm/custom/version.js.map +1 -1
- package/package.json +1 -1
- package/reference.md +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../../../src/api/types/Contact.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface Contact {\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../../../src/api/types/Contact.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface Contact {\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n /** The contact's company. Left out when the contact has none. */\n company?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
@@ -8,6 +8,8 @@ export interface ContactAssignmentActionResult {
|
|
|
8
8
|
name?: string | undefined;
|
|
9
9
|
first_name?: string | undefined;
|
|
10
10
|
last_name?: string | undefined;
|
|
11
|
+
/** The contact's company. Left out when the contact has none. */
|
|
12
|
+
company?: string | undefined;
|
|
11
13
|
tags: string[];
|
|
12
14
|
stage: string;
|
|
13
15
|
assigned_team_member: Blujay.AssignedTeamMember | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactAssignmentActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactAssignmentActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactAssignmentActionResult {\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContactAssignmentActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactAssignmentActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactAssignmentActionResult {\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n /** The contact's company. Left out when the contact has none. */\n company?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n}\n"]}
|
|
@@ -8,6 +8,8 @@ export interface ContactStageActionResult {
|
|
|
8
8
|
name?: string | undefined;
|
|
9
9
|
first_name?: string | undefined;
|
|
10
10
|
last_name?: string | undefined;
|
|
11
|
+
/** The contact's company. Left out when the contact has none. */
|
|
12
|
+
company?: string | undefined;
|
|
11
13
|
tags: string[];
|
|
12
14
|
stage: string;
|
|
13
15
|
assigned_team_member: Blujay.AssignedTeamMember | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactStageActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactStageActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactStageActionResult {\n /** Stage responses only. True when the stage changed. */\n stage_changed: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContactStageActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactStageActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactStageActionResult {\n /** Stage responses only. True when the stage changed. */\n stage_changed: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n /** The contact's company. Left out when the contact has none. */\n company?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
@@ -8,6 +8,8 @@ export interface ContactTagActionResult {
|
|
|
8
8
|
name?: string | undefined;
|
|
9
9
|
first_name?: string | undefined;
|
|
10
10
|
last_name?: string | undefined;
|
|
11
|
+
/** The contact's company. Left out when the contact has none. */
|
|
12
|
+
company?: string | undefined;
|
|
11
13
|
tags: string[];
|
|
12
14
|
stage: string;
|
|
13
15
|
assigned_team_member: Blujay.AssignedTeamMember | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactTagActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactTagActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactTagActionResult {\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContactTagActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactTagActionResult.ts"],"names":[],"mappings":";AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactTagActionResult {\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n /** The contact's company. Left out when the contact has none. */\n company?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ exports.userAgent = userAgent;
|
|
|
5
5
|
// Hand-written (not generated): the library version sent in User-Agent.
|
|
6
6
|
// Keep it equal to package.json's version; `npm test` checks.
|
|
7
7
|
const index_js_1 = require("../core/runtime/index.js");
|
|
8
|
-
exports.SDK_VERSION = "1.
|
|
8
|
+
exports.SDK_VERSION = "1.2.0";
|
|
9
9
|
/** For example `blujay-node/1.0.0 (darwin; arm64) Node/22.11.0`: this library, the platform, the runtime. */
|
|
10
10
|
function userAgent() {
|
|
11
11
|
return (0, index_js_1.getUserAgent)("blujay-node", exports.SDK_VERSION);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/custom/version.ts"],"names":[],"mappings":";;;AAOA,8BAEC;AATD,wEAAwE;AACxE,8DAA8D;AAC9D,uDAAwD;AAE3C,QAAA,WAAW,GAAG,OAAO,CAAC;AAEnC,6GAA6G;AAC7G,SAAgB,SAAS;IACrB,OAAO,IAAA,uBAAY,EAAC,aAAa,EAAE,mBAAW,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Hand-written (not generated): the library version sent in User-Agent.\n// Keep it equal to package.json's version; `npm test` checks.\nimport { getUserAgent } from \"../core/runtime/index.js\";\n\nexport const SDK_VERSION = \"1.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/custom/version.ts"],"names":[],"mappings":";;;AAOA,8BAEC;AATD,wEAAwE;AACxE,8DAA8D;AAC9D,uDAAwD;AAE3C,QAAA,WAAW,GAAG,OAAO,CAAC;AAEnC,6GAA6G;AAC7G,SAAgB,SAAS;IACrB,OAAO,IAAA,uBAAY,EAAC,aAAa,EAAE,mBAAW,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Hand-written (not generated): the library version sent in User-Agent.\n// Keep it equal to package.json's version; `npm test` checks.\nimport { getUserAgent } from \"../core/runtime/index.js\";\n\nexport const SDK_VERSION = \"1.2.0\";\n\n/** For example `blujay-node/1.0.0 (darwin; arm64) Node/22.11.0`: this library, the platform, the runtime. */\nexport function userAgent(): string {\n return getUserAgent(\"blujay-node\", SDK_VERSION);\n}\n"]}
|
|
@@ -36,9 +36,9 @@ export declare class ContactsClient {
|
|
|
36
36
|
*/
|
|
37
37
|
list(request?: Blujay.ContactListParams, requestOptions?: ContactsClient.RequestOptions): Promise<core.Page<Blujay.Contact, Blujay.ContactListResponse>>;
|
|
38
38
|
/**
|
|
39
|
-
* Creates a contact. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
39
|
+
* Creates a contact. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional. Returns `409 CONTACT_ALREADY_EXISTS` if the phone number belongs to a saved contact, or the email to any other contact, in your workspace.
|
|
40
40
|
*
|
|
41
|
-
* If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email
|
|
41
|
+
* If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email`, names and `company` you send, and returns `201` with `saved: true`.
|
|
42
42
|
*
|
|
43
43
|
* Creating a contact through the API doesn't send a webhook or start workflows that run on new contacts. To create or update in one call, use `POST /v1/contacts/import`.
|
|
44
44
|
*
|
|
@@ -69,9 +69,9 @@ export declare class ContactsClient {
|
|
|
69
69
|
create(request: Blujay.ContactCreateParams, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Blujay.ContactCreateResponse>;
|
|
70
70
|
private __create;
|
|
71
71
|
/**
|
|
72
|
-
* Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
72
|
+
* Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional.
|
|
73
73
|
*
|
|
74
|
-
* - If a contact has this phone number, Blujay updates it (`200`), including its email and
|
|
74
|
+
* - If a contact has this phone number, Blujay updates it (`200`), including its email, names and company when you send them. A contact Blujay created (`saved: false`) becomes saved.
|
|
75
75
|
* - If no contact has this phone number, Blujay creates one (`201`).
|
|
76
76
|
* - If you send an email that already belongs to a different contact, Blujay returns `409 CONTACT_MATCH_CONFLICT` and changes nothing. This happens even when no contact has the phone number.
|
|
77
77
|
*
|
|
@@ -99,9 +99,9 @@ export class ContactsClient {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* Creates a contact. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
102
|
+
* Creates a contact. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional. Returns `409 CONTACT_ALREADY_EXISTS` if the phone number belongs to a saved contact, or the email to any other contact, in your workspace.
|
|
103
103
|
*
|
|
104
|
-
* If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email
|
|
104
|
+
* If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email`, names and `company` you send, and returns `201` with `saved: true`.
|
|
105
105
|
*
|
|
106
106
|
* Creating a contact through the API doesn't send a webhook or start workflows that run on new contacts. To create or update in one call, use `POST /v1/contacts/import`.
|
|
107
107
|
*
|
|
@@ -177,9 +177,9 @@ export class ContactsClient {
|
|
|
177
177
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/contacts");
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
180
|
+
* Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional.
|
|
181
181
|
*
|
|
182
|
-
* - If a contact has this phone number, Blujay updates it (`200`), including its email and
|
|
182
|
+
* - If a contact has this phone number, Blujay updates it (`200`), including its email, names and company when you send them. A contact Blujay created (`saved: false`) becomes saved.
|
|
183
183
|
* - If no contact has this phone number, Blujay creates one (`201`).
|
|
184
184
|
* - If you send an email that already belongs to a different contact, Blujay returns `409 CONTACT_MATCH_CONFLICT` and changes nothing. This happens even when no contact has the phone number.
|
|
185
185
|
*
|