mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-22 19:39:01 -05:00
feat: add single contact using the API V2 (#6168)
This commit is contained in:
committed by
GitHub
parent
492a59e7de
commit
4e52556f7e
@@ -1658,6 +1658,69 @@ paths:
|
||||
- skippedContacts
|
||||
required:
|
||||
- data
|
||||
/contacts:
|
||||
servers: *a6
|
||||
post:
|
||||
operationId: createContact
|
||||
summary: Create a contact
|
||||
description: Creates a contact in the database. Each contact must have a valid
|
||||
email address in the attributes. All attribute keys must already exist
|
||||
in the environment. The email is used as the unique identifier along
|
||||
with the environment.
|
||||
tags:
|
||||
- Management API - Contacts
|
||||
requestBody:
|
||||
required: true
|
||||
description: The contact to create. Must include an email attribute and all
|
||||
attribute keys must already exist in the environment.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
environmentId:
|
||||
type: string
|
||||
attributes:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
required:
|
||||
- environmentId
|
||||
- attributes
|
||||
example:
|
||||
environmentId: env_01h2xce9q8p3w4x5y6z7a8b9c0
|
||||
attributes:
|
||||
email: john.doe@example.com
|
||||
firstName: John
|
||||
lastName: Doe
|
||||
userId: h2xce9q8p3w4x5y6z7a8b9c1
|
||||
responses:
|
||||
"201":
|
||||
description: Contact created successfully.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
environmentId:
|
||||
type: string
|
||||
attributes:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
example:
|
||||
id: ctc_01h2xce9q8p3w4x5y6z7a8b9c2
|
||||
createdAt: 2023-01-01T12:00:00.000Z
|
||||
environmentId: env_01h2xce9q8p3w4x5y6z7a8b9c0
|
||||
attributes:
|
||||
email: john.doe@example.com
|
||||
firstName: John
|
||||
lastName: Doe
|
||||
userId: h2xce9q8p3w4x5y6z7a8b9c1
|
||||
/contact-attribute-keys:
|
||||
servers: *a6
|
||||
get:
|
||||
@@ -4017,7 +4080,6 @@ components:
|
||||
type: string
|
||||
buttonLink:
|
||||
type: string
|
||||
format: uri
|
||||
imageUrl:
|
||||
type: string
|
||||
videoUrl:
|
||||
@@ -4297,7 +4359,6 @@ components:
|
||||
pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
|
||||
required:
|
||||
- light
|
||||
|
||||
highlightBorderColor:
|
||||
type:
|
||||
- object
|
||||
|
||||
Reference in New Issue
Block a user