Valimail Netblocks API

The Netblocks API from Valimail — 2 operation(s) for netblocks.

Operations 4

GET /accounts/{slug}/domains/{domain}/netblocks Returns a list of all netblocks of a domain or subdomain
POST /accounts/{slug}/domains/{domain}/netblocks Creates a new netblock for the domain
GET /accounts/{slug}/domains/{domain}/netblocks/{netblock} Returns a single netblock according to IP or CIDR
PUT /accounts/{slug}/domains/{domain}/netblocks/{netblock} Updates a netblock comment or the sender-slug associated with it

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/valimail-netblocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

valimail-netblocks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Configuration Netblocks API
  description: ValiMail Configuration API
  version: 1.1.0
servers:
- url: https://api.valimail.com
  description: API services
- url: https://api.valimail-staging.com
  description: Stage test server
- url: http://localhost:7001
  description: Local development server
security:
- bearerAuth: []
tags:
- name: Netblocks
paths:
  /accounts/{slug}/domains/{domain}/netblocks:
    get:
      summary: Returns a list of all netblocks of a domain or subdomain
      tags:
      - Netblocks
      parameters:
      - name: slug
        in: path
        description: Account slug to be queried.
        required: true
        schema:
          type: string
        example: valimail
      - name: domain
        in: path
        description: Domain to be queried.
        required: true
        schema:
          type: string
        example: dmarceverywhere.com
      - name: reverse
        description: Reverse the order of the list to be provided.
        in: query
        schema:
          type: boolean
        example: false
      responses:
        '200':
          description: Ok - A List of netblocks of the domain is provided ("comment" and "sender-slug" fields will be included if available)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    netblock:
                      type: string
                      description: IP address range in CIDR format
                    spf-record:
                      type: string
                      description: SPF record associated with the netblock
                    comment:
                      type: string
                      description: Comment related to the netblock
                    sender-slug:
                      type: string
                      description: Slug identifier for the sender
                    domain-slug:
                      type: string
                      description: Slug identifier for the domain
                example:
                - netblock: 127.0.0.1/32
                  spf-record: v=spf1 ip4:127.0.0.1 -all
                  comment: This is a comment
                  sender-slug: sendgrid
                  domain-slug: dmarceverywhere.com
        '400':
          description: Bad Request - Missing Authorization Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: 'missing Authorization: Bearer header'
                type: ''
                request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                call: api
                status: '400'
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              examples:
                authenticationFailed:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: Unauthorized
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
                invalidSlug:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: not authorized for slug valimail
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
        '404':
          description: Not Found - Account or domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                accountNotFound:
                  value:
                    request: /accounts/no-such-account/domains/{{domainSlug}}/netblocks
                    message: Account not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                domainNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/no-such-domain.example.com/netblocks
                    message: Domain not found
                    type: not-found
                    request-id: '12345'
                    call: internal
        '422':
          description: Unprocessable Entity - Failed to normalize or parse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: Invalid domain
                type: invalid-domain
                call: internal
        '429':
          description: Over Rate - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example: null
        '500':
          description: Internal Server Error - Service, database, or unclassified error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      summary: Creates a new netblock for the domain
      tags:
      - Netblocks
      description: 'Creates a new netblock for the domain or subdomain. The comment and the sender-slug are optional.

        '
      parameters:
      - name: slug
        in: path
        description: Account slug to create a netblock for the domain.
        required: true
        schema:
          type: string
        example: valimail
      - name: domain
        in: path
        description: Domain which the netblock will be linked to.
        required: true
        schema:
          type: string
        example: dmarceverywhere.com
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                netblock:
                  type: string
                comment:
                  type: string
                sender-slug:
                  type: string
            example:
              netblock: 127.0.0.1/32
              comment: This is a comment
              sender-slug: sendgrid
      responses:
        '200':
          description: Ok - Netblock created (the response will include the "sender-slug" and/or "comment" depending on the input)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Netblock'
        '400':
          description: Bad Request - Missing Authorization Token or invalid payload
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DefaultOdinErrorResponse'
                - $ref: '#/components/schemas/DelegatedAPIValidationErrorResponse'
                - $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              examples:
                missingAuthorizationToken:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: 'missing Authorization: Bearer header'
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '400'
                missingNetblockParameter:
                  value:
                    params: '{}'
                    details:
                    - field: netblock
                      value: ''
                      message: can't be blank
                invalidNetblockFormat:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                    message: Enter your netblock in standard CIDR notation.
                    type: not-a-netblock
                    call: internal
                invalidIpRange:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                    message: Invalid IP address range
                    type: invalid-ip-range
                    call: internal
                internalSendersDisallowedForSingleSenderDomain:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                    message: Select a known sending service for this single sender domain or remove the "Single Sender" option to allow internal senders.
                    type: internal-senders-disallowed-for-single-sender
                    call: internal
                cannotAddAnotherSenderOnSingleSenderDomain:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                    message: This domain does not allow the enabling of another sender.
                    type: cannot-add-another-sender
                    call: internal
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              examples:
                authenticationFailed:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: Unauthorized
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
                invalidSlug:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: not authorized for slug valimail
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
        '404':
          description: Not Found - Account, domain, or sender not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                accountNotFound:
                  value:
                    request: /accounts/no-such-account/domains/{{domainSlug}}/netblocks
                    message: Account not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                domainNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/no-such-domain.example.com/netblocks
                    message: Domain not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                senderNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                    message: Sender not found
                    type: not-found
                    request-id: '12345'
                    call: internal
        '409':
          description: Conflict - Existing netblock for the domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks
                message: has already been taken
                type: taken
                request-id: '12345'
                call: internal
        '422':
          description: Unprocessable Entity - Failed to normalize or parse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: Invalid domain
                type: invalid-domain
                call: internal
        '429':
          description: Over Rate - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example: null
        '500':
          description: Internal Server Error - Service, database, or unclassified error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{slug}/domains/{domain}/netblocks/{netblock}:
    get:
      summary: Returns a single netblock according to IP or CIDR
      tags:
      - Netblocks
      parameters:
      - name: slug
        in: path
        description: Account slug to be queried.
        required: true
        schema:
          type: string
        example: valimail
      - name: domain
        in: path
        description: Domain which the netblock is linked to.
        required: true
        schema:
          type: string
        example: dmarceverywhere.com
      - name: netblock
        in: path
        description: IP or CIDR of the netblock
        schema:
          type: string
        required: true
        example: 127.0.0.1/32
      responses:
        '200':
          description: Ok - Netblock data is provided  ("comment" and "sender-slug" fields will be included if available)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Netblock'
        '400':
          description: Bad Request - Missing Authorization Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: 'missing Authorization: Bearer header'
                type: ''
                request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                call: api
                status: '400'
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              examples:
                authenticationFailed:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: Unauthorized
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
                invalidSlug:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: not authorized for slug valimail
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
        '404':
          description: Not Found - Account, domain, or netblock not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                accountNotFound:
                  value:
                    request: /accounts/no-such-account/domains/{{domainSlug}}/netblocks/127.0.0.1%2F32
                    message: Account not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                domainNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/no-such-domain.example.com/netblocks/127.0.0.1%2F32
                    message: Domain not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                netblockNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks/203.0.113.0%2F24
                    message: NetblockConfiguration not found
                    type: not-found
                    request-id: '12345'
                    call: internal
        '422':
          description: Unprocessable Entity - Failed to normalize or parse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: Invalid domain
                type: invalid-domain
                call: internal
        '429':
          description: Over Rate - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example: null
        '500':
          description: Internal Server Error - Service, database, or unclassified error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      summary: Updates a netblock comment or the sender-slug associated with it
      tags:
      - Netblocks
      parameters:
      - name: slug
        in: path
        description: Account slug to update a netblock.
        required: true
        schema:
          type: string
        example: valimail
      - name: domain
        in: path
        description: Domain which the netblock is linked to.
        required: true
        schema:
          type: string
        example: dmarceverywhere.com
      - name: netblock
        in: path
        description: IP or CIDR of the netblock
        schema:
          type: string
        required: true
        example: 127.0.0.1/32
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                sender-slug:
                  type:
                  - string
                  - 'null'
              example:
                comment: This is a comment update
                sender-slug: sendgrid
      responses:
        '200':
          description: Ok - Netblock updated (the response will include the "comment" and/or the "sender-slug" depending on the data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Netblock'
        '400':
          description: Bad Request - Missing Authorization Token or invalid payload
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DefaultOdinErrorResponse'
                - $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              examples:
                missingAuthorizationToken:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: 'missing Authorization: Bearer header'
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '400'
                internalSendersDisallowedForSingleSenderDomain:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks/127.0.0.1%2F32
                    message: Select a known sending service for this single sender domain or remove the "Single Sender" option to allow internal senders.
                    type: internal-senders-disallowed-for-single-sender
                    call: internal
                cannotAddAnotherSenderOnSingleSenderDomain:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks/127.0.0.1%2F32
                    message: This domain does not allow the enabling of another sender.
                    type: cannot-add-another-sender
                    call: internal
        '401':
          description: Unauthorized - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultOdinErrorResponse'
              examples:
                authenticationFailed:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: Unauthorized
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
                invalidSlug:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                    message: not authorized for slug valimail
                    type: ''
                    request-id: CkmvjqpFKrQzajCScVFHTnokjKKiORRF
                    call: api
                    status: '401'
        '404':
          description: Not Found - Account, domain, netblock, or sender not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                accountNotFound:
                  value:
                    request: /accounts/no-such-account/domains/{{domainSlug}}/netblocks/127.0.0.1%2F32
                    message: Account not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                domainNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/no-such-domain.example.com/netblocks/127.0.0.1%2F32
                    message: Domain not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                netblockNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks/203.0.113.0%2F24
                    message: NetblockConfiguration not found
                    type: not-found
                    request-id: '12345'
                    call: internal
                senderNotFound:
                  value:
                    request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/netblocks/127.0.0.1%2F32
                    message: Sender not found
                    type: not-found
                    request-id: '12345'
                    call: internal
        '422':
          description: Unprocessable Entity - Failed to normalize or parse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultDelegatedAPIErrorResponse'
              example:
                request: /accounts/{{the_account_slug}}/domains/{{domainSlug}}/
                message: Invalid domain
                type: invalid-domain
                call: internal
        '429':
          description: Over Rate - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example: null
        '500':
          description: Internal Server Error - Service, database, or unclassified error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Netblock:
      type: object
      properties:
        netblock:
          type: string
          description: IP address range in CIDR format
        spf-record:
          type: string
          description: SPF record associated with the netblock
        comment:
          type: string
          description: Comment related to the netblock
        sender-slug:
          type: string
          description: Slug identifier for the sender
        domain-slug:
          type: string
          description: Slug identifier for the domain
      example:
        netblock: 127.0.0.1/32
        spf-record: v=spf1 ip4:127.0.0.1 -all
        comment: This is a comment
        sender-slug: sendgrid
        domain-slug: dmarceverywhere.com
    Any: {}
    ErrorResponse:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/Any'
        message:
          type: string
        type:
          type: string
        request-id:
          type: string
        call:
          type: string
    DelegatedAPIValidationErrorResponse:
      type: object
      properties:
        params:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/DelegatedAPIValidationErrorDetail'
    DefaultOdinErrorResponse:
      type: object
      properties:
        request:
          type: string
        message:
          type: string
        type:
          type: string
        request-id:
          type: string
        call:
          type: string
        status:
          type: string
    DefaultDelegatedAPIErrorResponse:
      type: object
      properties:
        request:
          type: string
        message:
          type: string
        type:
          type: string
        call:
          type: string
    DelegatedAPIValidationErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type:
          - string
          - 'null'
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT