API

ContactSubmission

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/contact_submissions create The message was accepted (or silently discarded as spam)

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.ContactSubmission(nil).Create(map[string]any{"email": "example", "message": "example", "name": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:ContactSubmission():create({ email = "example", message = "example", name = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->ContactSubmission()->create(["email" => "example", "message" => "example", "name" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.ContactSubmission().create({ "email": "example", "message": "example", "name": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.ContactSubmission.create({ "email" => "example", "message" => "example", "name" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.ContactSubmission().create({ email: "example", message: "example", name: "example" })

Fields

Field Type Required Description
company one,string,null No Company
email string Yes Stored downcased and stripped.
message string Yes Message
name string Yes Name
website one,string,null No Honeypot.

create

POST /api/v1/contact_submissions

Operation ID: api_v1_contact_submissions.

Authentication: not required.

Request body

application/json

Property Type Required Description
company string No
email string Yes Stored downcased and stripped.
message string Yes
name string Yes
website string No Honeypot. Render it hidden and leave it empty; any value discards the submission.

Responses

201: The message was accepted (or silently discarded as spam)

application/json

Property Type Required Description
created_at string Yes ISO8601 timestamp.
id string Yes Public id (contact_submission_…).
400: A required field was missing from the request body
422: A field failed validation
429: Too many submissions from this IP