Invite Guests to Share Link
POST
/api/v1/workspaces/{workspace_id}/emails/{email_id}/share_link/invitations
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/share_link/invitations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"invitees":["client@example.com"],"message":"Could you take a look before Friday?","timezone":"Europe/London"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails/1/share_link/invitations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "invitees": [ "client@example.com" ], "message": "Could you take a look before Friday?", "timezone": "Europe/London" }'Emails the share link to each address. Link sharing must be on. Re-inviting an address that was already invited sends the link again.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
email_id
required
integer
Email ID
Request Body
Section titled “Request Body”Media typeapplication/json
object
invitees
required
Email addresses to send the share link to. At most 20 per request.
Array<string>
message
An optional message included in the invitation email.
string | null
Example
Could you take a look before Friday?timezone
required
The inviter’s IANA time zone. The invitation email shows the link’s expiry date in this time zone.
string
Example
Europe/LondonResponses
Section titled “ Responses ”Successful
Media typeapplication/json
object
id
required
integer
email_id
required
integer
url
required
The public link to send to guests.
string
expires_at
required
string format: date-time
enabled
required
Whether link sharing is on. The link only works while this is true and it hasn’t expired.
boolean
active
required
Whether the link works right now, i.e. sharing is on and the link hasn’t expired.
boolean
invitations
required
People the share link has been emailed to.
Array<object>
object
id
required
integer
email
required
string
invited_by
required
created_at
required
string format: date-time
created_by
required
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "id": 12345, "email_id": 12345, "url": "https://app.emailshepherd.com/share/pQ9sN3vXk2mB7tR4wY8zA1cD5fG6hJ0e", "expires_at": "2020-01-31T00:00:00Z", "enabled": true, "active": true, "invitations": [ { "id": 12345, "email": "client@example.com", "invited_by": { "type": "User", "id": 12345, "first_name": "John", "last_name": "Smith", "profile_image_url": "https://example.com/profile.jpg" }, "created_at": "2020-01-01T00:00:00Z" } ], "created_by": { "type": "User", "id": 12345, "first_name": "John", "last_name": "Smith", "profile_image_url": "https://example.com/profile.jpg" }, "created_at": "2020-01-01T00:00:00Z", "updated_at": "2020-01-01T00:00:00Z"}Unauthorized
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Forbidden
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Not Found
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Unprocessable Entity
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}