POST/​v1/​envelopes/​blueprint/​:slug/​

Create an envelope from a custom blueprint

This endpoint creates an envelope from a blueprint by passing in data (or "context") to that blueprint. Blueprints can be official blueprints or custom blueprints that you create.

This page documents how to use blueprint to create an envelope from a custom blueprint, and points out where in the request body you would pass the blueprint's context. The specification for each official blueprint's context is can be found on a different page for that specific official blueprint (e.g., the Confidentiality Agreement reference).

The API to use a blueprint is identical from blueprint to blueprint except for two things. First, each blueprint has a unique context object that's passed in the API call. This is because the information needed to generate a Confidentiality Agreement is different than the information needed to generate an Independent Contractor Agreement, for example.

Second, a blueprint may sometimes call for you to pass in the parties separately from the context, but that depends on the shape of that blueprint's context.

URL Path Parameters

  • Name
    slug
    Type
    string
    required
    Description

    The blueprint's unique identifying slug. Official blueprints take the form of official/<name>/. For example, the full path to create a contract from the Independent Contractor Agreement blueprint is /v1/envelopes/blueprint/official/independent-contractor-agreement/.

    Custom blueprints take the form of <your organization>/<name>/. If an organization named "The Smith Company" had a custom blueprint named "Funnel Cake Creation Agreement", the slug for that blueprint might be smith/cake-creation-agreement/.

Request body

  • Name
    name
    Type
    string
    required
    Description

    The name of the envelope. Limited to 254 characters that are alphanumeric, spaces, numbers, or symbols.

  • Name
    context
    Type
    object
    required
    Description

    An object containing the specific information required to render the blueprint. The shape of this object depends on which blueprint is being used.

    The shape of this context object is an object valid under the schema of your custom blueprint. If Magistrate prepared your custom blueprint, Magistrate will provide this to you.

  • Name
    parties
    Type
    list of objects
    required sometimes
    Description

    This attribute is required only if the blueprint's context does not include information on the parties. The reference for each blueprint will indicate whether this attribute is required. If it's not required, this attribute will be ignored.

    If this attribute is required, it must represent a list of the parties to the contract. Minimum length of 1. The parties should be objects with the following keys:

    Party Object
  • Name
    name
    Type
    string
    required
    Description

    The legal name of the party. For example, "Magistrate Inc." if the party is an entity. Or "Harry Khanna" if the party is a human being. Limited to 80 characters.

  • Name
    email
    Type
    string
    required
    Description

    The email address of the party. If the party is an entity like a corporation, this should be the email address of the authorized signatory. Limited to 254 characters.

  • Name
    is_entity
    Type
    boolean
    required
    Description

    If the party to the contract is an entity like a corporation, this should be true. If the party is a human being, this should be false.

  • Name
    authorized_human
    Type
    object
    required sometimes
    Description

    The human being that is authorized to sign for the entity. Required if is_entity is true. Ignored if is_entity is false.

    Authorized Human Object Expand
  • Name
    webhook_url
    Type
    string
    Description

    The URL where Magistrate will POST webhooks related to this envelope. If this is provided, the API will immediately POST a webhook of type webhook_url_verification to the endpoint, and if it does not return a 2xx response within a couple seconds, the whole API call fail with a 400 response.

  • Name
    autosign
    Type
    boolean
    Description

    If autosign is true, any signatures belonging to the creator of the envelope will be signed automatically. The creator will not receive an email soliciting their signature since they will have already signed.

    This is ignored if the action is draft. This is also ignored if the creator of the envelope is not also a signatory.

  • Name
    suppress_emails
    Type
    string
    Description

    If provided, it must be the string creator. If this is provided, the creator of the envelope will not receive any emails related to the envelope.

  • Name
    action
    Type
    string
    required
    Description

    One of the following strings: send or draft.

    send will generate an envelope and send it for signature to all parties in one step.

    draft will generate an envelope and save it as a draft. To make any edits or send it for signature, you must log into the web user interface.

Request

POST
/v1/envelopes/blueprint/:slug/
curl "https://api.getmagistrate.com/v1/envelopes/blueprint/official/safe/" \
  -H "Authorization: Token d0b0b4628e184832b1b0bc1e93fbd487" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Simple Agreement for Future Equity",
    "context": {
      "details": {
        "purchase_amount": 50000,
        "cap": {
          "amount": 5000000
        },
        "date": "2022-06-01",
        "governing_law": "CA"
      },
      "company": {
        "name": "Magistrate Inc.",
        "email": "harry@getmagistrate.com",
        "is_entity": true,
        "state_of_incorporation": "DE",
        "entity_form": "Corporation",
        "authorized_human": {
          "name": "Harry Khanna",
          "title": "Chief Executive Officer"
        }
      },
      "investor": {
        "name": "Lisa Vedernikova Khanna",
        "is_entity": false,
        "email": "lisa@getmagistrate.com"
      }
    },
    "webhook_url": "https://your-domain.example.com/webhooks/",
    "action": "send"
  }'

Response

If the request is successful, the endpoint will return a status code of 201 Created.

The response body will be the new envelope object.